找到com.google.android.gms:play-services:9.0.0,但google-services插件需要8.3.0版。
所有依赖项都处于同一级别:
compile 'com.google.android.gms:play-services-auth:9.0.0'
compile 'com.google.android.gms:play-services-gcm:9.0.0'
compile "com.google.firebase:firebase-messaging:9.0.0"
compile 'com.google.android.gms:play-services-maps:9.0.0'
compile 'com.google.android.gms:play-services-location:9.0.0'
compile 'com.google.android.gms:play-services-analytics:9.0.0'
compile 'com.google.android.gms:play-services:9.0.0'
我已经尝试将其放在最后(依赖后)
apply plugin: 'com.google.gms.google-services'
仍然无效。
它给了我一个错误
Error:Execution failed for task ':app:processGpcaDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 8.3.0.
无法在其他问题中找到解决方案。
答案 0 :(得分:1)
更新您的类路径以指向最新的google-services版本 - 它应该是classpath 'com.google.gms:google-services:3.0.0'
:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.google.gms:google-services:3.0.0'
}
}
这通常在最顶层的build.gradle
文件中完成。