Android Example Solving "Font asset not found" from library

Marcus Araujo

Member
Licensed User
I developed a class (compiled in library) that makes use of Typeface.MATERIALICONS, but when I tried using it there was this error:

HTML:
java.lang.RuntimeException: Font asset not found b4x_materialicons.ttf
I could not find a thread summarizing this problem in this forum for a workout, but the answer seems to be very simple. You just need to either add the TTF file manually to the Files folder or simply make use of the typeface in the app code, so that the compiler will add that file for you.

For example:
B4X:
Dim tf As Typeface = Typeface.MATERIALICONS 'ignore
 
Top