简体   繁体   English

将材料库更新到 1.1.0 时资源编译失败

[英]Resource compilation failed on updating material library to 1.1.0

I have updated my material library from com.google.android.material:material:1.0.0 to com.google.android.material:material:1.1.0我已将我的材料库从com.google.android.material:material:1.0.0 更新com.google.android.material:material:1.1.0

I am getting the following error after the update.更新后我收到以下错误。 The only solution that I found is to revert it to an older version.我发现的唯一解决方案是将其恢复为旧版本。

Also, I have tried updating every dependency to latest version, but that didn't work either.另外,我尝试将每个依赖项更新到最新版本,但这也不起作用。

/home/name/.gradle/caches/transforms-2/files-2.1/03d95e2ec81bf572bcb58974acba7470/material-1.1.0-alpha06/res/values/values.xml:718:5-725:23: AAPT: error: duplicate value for resource 'attr/checkedButton' with config ''. /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'。

adding my dependencies for reference:添加我的依赖项以供参考:

 // 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'

if you are getting AAPT issue than issue might be in your any of your XML file.如果您遇到 AAPT 问题,那么问题可能出在您的任何 XML 文件中。 or if this not the issue please try to add或者如果这不是问题,请尝试添加

implementation 'com.google.android.material:material:1.0.0''

IF you are getting AAPT issue in androidx than issue might be in your any of your layout files if your project in androidx then you can update your design library.如果您在androidx中遇到 AAPT 问题,那么如果您的项目在 androidx 中,问题可能出现在您的任何布局文件中,那么您可以更新您的设计库。 Also check all layout files any resource file and drawable file or sting files may be missing.还要检查所有布局文件,任何资源文件和可绘制文件或 sting 文件都可能丢失。

implementation 'com.google.android.material:material:1.0.0'实现 'com.google.android.material:material:1.0.0'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM