I wanted to upgrade my project to support Android Lollipop and API 21, so I changed AppCompat version at the dependencies to 21.0.0, and my target SDK to 21.
But now, When I'm trying to sync project with gradle files, it gives me 102 errors
that weren't there before:
1 error of "Attribute 'theme' has already defined"
- given by my colors.XML
file,
and another 101 errors of "no resources found that matches the given name..."
- most of them are Material ones - given by "build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.0/res/values-v11/values.XML"
.
Already updated all SDK tools in Android SDK software, Using Android Studio 0.8.9 Beta.
Can anyone help? Thanks.
I had the first issue as well. It can be fixed by updating the Google Play Services dependency to 6.1.+.
In Gradle (which I hope you are using) this is: compile 'com.google.android.gms:play-services:6.1.+'
As for the second issue - as people have said in the comments, you should make sure ALL the components in your SDK installation are up to date.
I had the same problem but upgrade to latest versions doesn't helped.
But error message Attribute “theme” has already been defined
changed to Attribute “layout” has already been defined
In Google Play Services changes I've found this
<declare-styleable name="WalletFragmentOptions">
<!-- Theme to be used for the Wallet selector -->
- <attr name="theme" format="enum">
+ <attr name="appTheme" format="enum">
And this is the key.
If you have in your attr.xml attributes theme or layout or maybe something else - rename it. It seems merger can't deal with it.
Gradle in the Android studio suggests the latest version of com.google.android.gms:play-services
.
After updating that to the latest version, the problem got solved.
compile 'com.google.android.gms:play-services:8.3.0'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With