Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No resource identifier found for attribute fontFamily in package android

Tags:

android

I face error

No resource identifier found for attribute fontFamily in package android

in my android application , what is the problem ?

like image 296
Mohammed Subhi Sheikh Quroush Avatar asked Feb 01 '13 16:02

Mohammed Subhi Sheikh Quroush


2 Answers

If you are referring to a TextView, android:fontFamily was added in API Level 16 and will not be available on older devices. You have your Android build target (e.g., Properties > Android in Eclipse) to something older than API Level 16.

like image 86
CommonsWare Avatar answered Nov 15 '22 21:11

CommonsWare


You will need to compile with API 16 or above.

From the command line use --target 19 or higher, as in:

android update project --path . --name MyApp --target 19

BTW: To see how the target numbers match the API numbers, use android list targets

I hope somebody finds this useful, as I spent hours trying to solve the following error:

Error: No resource found that matches the given name: attr 'android:fontFamily'

like image 40
Danny Schoemann Avatar answered Nov 15 '22 21:11

Danny Schoemann