【发布时间】:2014-10-21 06:54:42
【问题描述】:
我正在更新我的应用程序以支持材料主题(我的应用程序使用 Google Play 服务)
当我同步我的项目时,它出现了:
...\app\build\intermediates\exploded-aar\com.google.android.gms\play-services\6.1.11\res\values\wallet_colors.xml
Error:Attribute "showText" has already been defined
我的 gradle 依赖项:
compile 'com.android.support:appcompat-v7:21.0.0'
compile 'com.google.android.gms:play-services:6.1.11'
// the latest version of play-services is 6.1.11
如果我排除 appcompat-v7,则项目编译时不会出错。
我是不是对棒棒糖过于兴奋而没有正确阅读文档?我该如何解决这个问题?
部分构建脚本:
compileSdkVersion 21
buildToolsVersion '21.0.1'
dexOptions {
preDexLibraries true
//incremental true
}
defaultConfig {
minSdkVersion 14
targetSdkVersion 21
versionCode 11
versionName '1.0'
renderscriptTargetApi 21
renderscriptSupportMode true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
本地 Google 存储库如下所示:
【问题讨论】:
-
尝试像这样定义依赖
compile 'com.google.android.gms:play-services:6.1.+' -
是的,我试过了,6.1.+ 解析为 6.1.11
-
我对 6.1.11 版本有类似的问题。它抱怨属于 Play Services 库的 wallet_colors.xml 中的“颜色”属性
标签: android google-play-services android-5.0-lollipop android-appcompat