【发布时间】:2018-01-22 22:58:57
【问题描述】:
我与 firebase 11.8.0 和 google-services 插件 3.1.2 存在明显冲突。构建失败,建议我改用 11.4.2 版的 firebase。
我的 gradle 构建文件的相关摘录:
根build.gradle
buildscript {
repositories {
google()
...
}
dependencies {
classpath 'com.google.gms:google-services:3.1.2'
...
}
}
应用build.gradle:
apply plugin: 'com.google.gms.google-services'
repositories {
google()
....
}
dependencies {
implementation "com.google.firebase:firebase-core:11.8.0"
....
}
我已经正确生成了 firebase 应用文件:
./app/src/debug/google-services.json
./app/src/release/google-services.json
当我使用./gradlew clean assembleDebug 构建时,构建失败并出现以下错误:
> Task :app:processDebugGoogleServices FAILED
Found com.google.firebase:firebase-core:11.8.0, but version 11.4.2 is needed for the google-services plugin.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> 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 11.4.2.
【问题讨论】:
标签: android firebase gradle google-play-services gradle-plugin