Akh*_*han 2 android android-sdk-tools android-studio android-buildconfig android-gradle-3.0
我正在将我的应用程序编译和目标 SDK 版本从 23 更新到 26(Android 8.0)。但是更新后,出现以下错误:
错误:资源 'attr/fontFamily' 与 config' 的重复值。
现在在 gradle 中有以下支持库:
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
Run Code Online (Sandbox Code Playgroud)
请不要建议将 targetSdkVersion 降级到 25。也不要建议这个问题:Duplicate value for resource 'attr/font' with config "
基本上问题是应用程序中使用的旧依赖项来使用RobotoTextView。我已经能够通过更新这个库来解决这个问题。
从:
implementation 'com.github.johnkil.android-robototextview:robototextview:2.5.0'
Run Code Online (Sandbox Code Playgroud)
到:
implementation 'com.github.johnkil.android-robototextview:robototextview:4.0.0'
Run Code Online (Sandbox Code Playgroud)