Android Runtime Exception font asset not found

后端 未结 13 828
执念已碎
执念已碎 2021-01-04 01:11

Here is my code and screenshot I\'m trying to set custom font typeface but Runtime exception occurs font asset not found while font file is in asset folder. Am I missing som

13条回答
  •  旧时难觅i
    2021-01-04 01:40

    I had the same problem and managed to fix it. Originally I thought the font files were corrupt but they weren't. Then I thought Android Studio didn't like .ttf files, because they were the only ones not working. Turns out it's nothing wrong with the fonts.

    FIX: Just click Build > Clean project. Fixed it straight away for me.

提交回复
热议问题