android - 将材料库更新到 1.1.0 时资源编译失败
问题描述
我已将我的材料库从com.google.android.material:material:1.0.0更新为com.google.android.material:material:1.1.0
更新后我收到以下错误。我找到的唯一解决方案是将其还原为旧版本。
另外,我尝试将每个依赖项更新到最新版本,但这也不起作用。
/home/name/.gradle/caches/transforms-2/files-2.1/03d95e2ec81bf572bcb58974acba7470/material-1.1.0-alpha06/res/values/values.xml:718:5-725:23:AAPT:错误:重复值对于配置为“”的资源“attr/checkedButton”。
添加我的依赖项以供参考:
// Support libraries
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.1.0'
//Retrofit and ok http
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'
//Multidex
implementation 'androidx.multidex:multidex:2.0.1'
// Flex
implementation 'com.hopenlib.library:cflextools:1.0.0'
implementation 'com.google.android:flexbox:1.0.0'
// Testing
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
解决方案
如果您在 androidx 中遇到 AAPT 问题,那么如果您的项目在androidx 中,问题可能出现在您的任何布局文件中,那么您可以更新您的设计库。 还要检查所有布局文件,任何资源文件和可绘制文件或 sting 文件可能丢失。
实施 'com.google.android.material:material:1.0.0'
推荐阅读
- jquery - 无法显示级联下拉列表的值 - 500(内部服务器错误)
- mysql - 如何将两组不同的数据加载到动态相关下拉列表中?
- python - 合并两个 Spark 数据框并添加新列以识别最新日期
- android - 更改 androidx.preference.EditTextPreference 中的 Title 和 EditText 颜色
- ajax - Thymeleaf:点击表格行提交表单
- flutter - Flutter:如何在 DatePicker 中仅启用特定日期的日期
- javascript - 如何从浏览器使用 Unleash Feature 服务器(React 项目)
- c++ - 关于在 main 中列出和声明函数的问题
- python - 如何按该行的数量从树视图中删除一行?
- postgresql - 将重复数据存储为 Postgres 中的列?