Error:In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVar on Android build

1. First check whether the dependencies in build.gradle have dependencies that do not specify a version (eg: compile 'com.android.support:recyclerview-v7:+')

Check to see if there is a //noinspection GradleCompatible comment in dependencies

 

 

If there is any, delete the comment of //noinspection GradleCompatible. At this time, there will be a line of dependency error, usually com.android.support:appcompat-v7 error

 

 

Deleting the above //noinspection GradleCompatible will find that the dependent V7 package prompts that the dependent version is inconsistent

At this time, change 'com.android.support:recyclerview-v7:+' ( note: the dependency is not specified version, the recyclerview here is just a demonstration ) to

compile 'com.android.support:recyclerview-v7:26.0.2'

then build it again

Note: my buildToolsVersion "26.0.2" is like this

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324393753&siteId=291194637