错误:修复版本冲突(google-services 插件)

新手上路,请多包涵

根据 this SO thread,我知道存在版本冲突,但在谷歌发布新版本后问题仍然存在。

错误:任务“:app:processDebugGoogleServices”执行失败。请通过更新 google-services 插件的版本来修复版本冲突(有关最新版本的信息可在 https://bintray.com/android/android-tools/com.google.gms.google-services/ 获得)或将 com.google.android.gms 的版本更新为 10.0.1。

我的 build.gradle(模块:应用程序)

 ....
dependencies {
   compile fileTree(dir: 'libs', include: ['*.jar'])
   androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
    })
   compile 'com.android.support:appcompat-v7:26.+'
   compile 'com.android.support.constraint:constraint-layout:1.0.2'
   testCompile 'junit:junit:4.12'
   compile 'com.google.firebase:firebase-messaging:10.0.1'
   compile 'com.google.android.gms:play-services-maps:11.0.4'
   compile 'com.google.android.gms:play-services-location:11.0.4'
}

apply plugin: 'com.google.gms.google-services'

现在需要做哪些改变?

原文由 Faizan Mubasher 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 596
2 个回答

我觉得你变了

compile 'com.google.firebase:firebase-messaging:11.0.4'

原文由 Adil Saiyad 发布,翻译遵循 CC BY-SA 4.0 许可协议

将谷歌服务和 Firebase 库 更新最新版本

谷歌服务

 classpath 'com.google.gms:google-services:4.3.1'

火力基地

 implementation 'com.google.firebase:firebase-database:19.0.0'

原文由 Praveen 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题