No resource identifier found for attribute fontFamily in package android-ThrowExceptions

Exception or error:

I face error

No resource identifier found for attribute fontFamily in package android

in my android application , what is the problem ?

How to solve:

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.

###

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’

Leave a Reply

Your email address will not be published. Required fields are marked *