【发布时间】:2014-12-20 10:06:47
【问题描述】:
我尝试为 Google Play Service 6.5.+ 使用新的 Granular Dependency
在我的 gradle 中我设置了:
dependencies {
compile 'com.android.support:appcompat-v7:21.0.2'
compile 'com.google.maps.android:android-maps-utils:0.3'
compile 'com.google.android.gms:play-services-base:6.5.87'
compile 'com.google.android.gms:play-services-location:6.5.87'
compile 'com.google.android.gms:play-services-maps:6.5.87'
}
但我得到了这个错误:
Error:Execution failed for task ':app:processDebugResources'.
Error: more than one library with package name 'com.google.android.gms'
You can temporarily disable this error with android.enforceUniquePackageName=false
However, this is temporary and will be enforced in 1.0
我已经更新了所有 SDK。
使用此新功能的正确方法是什么? 谢谢。
已解决
问题是android-maps-utils已经有Play Service 6.5.+,所以报错。
【问题讨论】:
-
冲突似乎发生在 android-maps-utils 库和任何 play-services 库之间。我不确定是否不再需要 android-maps-utils 或者某些东西是否被错误打包。
标签: android google-play-services android-gradle-plugin