错误:修复版本冲突(Google服务插件)

根据这个 SO线程,我知道存在版本冲突,但是在从Google获得新版本后问题仍然存在。


错误:任务':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'


现在需要进行哪些更改?


白衣非少年
浏览 451回答 3
3回答

HUX布斯

我想你改变了compile 'com.google.firebase:firebase-messaging:11.0.4'

慕神8447489

您必须为所有3个库仅使用一个版本compile 'com.google.firebase:firebase-messaging:11.0.4'compile 'com.google.android.gms:play-services-maps:11.0.4'compile 'com.google.android.gms:play-services-location:11.0.4'或仅将10.0.1用于3个库
打开App,查看更多内容
随时随地看视频慕课网APP