Lollipop AppCompat-v7 21-属性"theme"已经被定义 [英] Lollipop AppCompat-v7 21 - Attribute "theme" has already been defined
问题描述
我想升级我的项目以支持Android Lollipop和API 21,因此我将依赖项下的AppCompat版本更改为21.0.0, 和我的目标SDK为21.
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.
但是现在,当我尝试与gradle文件同步项目时,它会给我102 errors
以前没有的文件:
But now, When I'm trying to sync project with gradle files, it gives me 102 errors
that weren't there before:
1个错误-由我的colors.XML
文件
1 error of "Attribute 'theme' has already defined"
- given by my colors.XML
file,
和"no resources found that matches the given name..."
的另外101个错误-大多数是重大错误-由"build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.0/res/values-v11/values.XML"
给出.
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"
.
已经更新了Android SDK软件中的所有SDK工具, 使用Android Studio 0.8.9 Beta.
Already updated all SDK tools in Android SDK software, Using Android Studio 0.8.9 Beta.
任何人都可以帮忙吗?谢谢.
Can anyone help? Thanks.
推荐答案
我也遇到了第一个问题.可以通过将Google Play服务依赖项更新为6.1.+来解决.
I had the first issue as well. It can be fixed by updating the Google Play Services dependency to 6.1.+.
在Gradle(我希望您正在使用)中,它是: 编译'com.google.android.gms:play-services:6.1.+'
In Gradle (which I hope you are using) this is: compile 'com.google.android.gms:play-services:6.1.+'
关于第二个问题-正如人们在评论中所说,您应该确保SDK安装中的所有组件都是最新的.
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.
这篇关于Lollipop AppCompat-v7 21-属性"theme"已经被定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!