我尝试仅向我的应用添加 google-analytics 和广告,但当我尝试添加时:
compile 'com.google.android.gms:play-services-analytics:8.3.0'
compile 'com.google.android.gms:play-services-ads:8.3.0'
我收到此错误:
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
我看过很多与此相关的帖子,大多数建议添加完整的库(编译“com.google.android.gms:play-services:8.3.0”),
但这不是一个解决方案,因为现在有很多权限播放服务请求。
提前致谢。
最佳答案
在项目(而非应用)build.gradle 的依赖项中,将依赖项更新为类路径“com.google.gms:google-services:1.5.0-beta2”
关于android studio google play-services 8.3 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33585440/