我的项目使用asne google plus库。它使用旧版本的谷歌播放服务。
当我添加新版本的谷歌地图时,渐变构建失败,并显示以下消息:
Error:Execution failed for task ':app:processDebugResources'.
Error: more than one library with package name 'com.google.android.gms'
我的应用程序中的依赖项.gradle:
compile 'com.github.asne:asne-googleplus:0.3.3'
compile 'com.google.android.gms:play-services-maps:8.3.0'
compile 'com.google.android.gms:play-services-location:8.3.0'
当我像这样制作asne
时:
compile ('com.github.asne:asne-googleplus:0.3.3') {
transitive = true
}
这个库变得不可见,我无法调用它的方法。
如何解决这一冲突?
我建议您使用整个依赖
compile 'com.google.android.gms:play-services:8.3.0'
而不是将其拆分为播放服务位置:8.3.0和播放服务地图:8.3.0等部分。此链接提供了原因的详细解释。
您可以尝试排除库的google依赖项:
compile ('com.github.asne:asne-googleplus:0.3.3') {
exclude group: 'com.google.android.gms'
}