多数都遇到过这个问题。项目低于28的时候,使用的compileSdkVersion 26
编译的时候报错了如下:
Android resource linking failed
D:\D\otherProject\trafit-android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
D:\D\otherProject\trafit-android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
D:\D\otherProject\trafit-android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:3916: error: resource android:attr/fontVariationSettings not found.
D:\D\otherProject\trafit-android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:3917: error: resource android:attr/ttcIndex not found.
error: failed linking references.
这个时候你要注意你的build gradle 版本信息是不是高于3.0
classpath 'com.android.tools.build:gradle:3.0.1'
多数都是版本过高了这个时候把他改到3.0就行了,同时
#Mon Oct 14 15:15:59 CST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
也要对应降下去就行了