我尝试对 Google Play Service 6.5.+ 使用新的粒度依赖关系
在我的 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。
使用这个新功能的正确方法是什么?
谢谢。
SOLVED
问题是android-maps-utils已经有Play Service 6.5.+,所以报错。
The android-maps-utils
目前图书馆已经包括 https://github.com/googlemaps/android-maps-utils/blob/ee924f7f074a9a24a87c8427f04778e21f95f5e6/library/build.gradle#L19Google Play 服务。您可以尝试以下方法之一:
打开一个问题他们的问题跟踪器 https://github.com/googlemaps/android-maps-utils/issues所以他们会适应或帮助你(这意味着其他人也会从中受益)。
-
试试这个,我还没有测试过这个它可能不起作用!我还没有研究过地图实用程序来了解它们实际使用的内容。
compile('com.google.maps.android:android-maps-utils:0.3') {
exclude group: 'com.google.android.gms'
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)