低于构建 错误:失败:构建因异常而失败。
出了什么问题: 任务“: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 16.0.3.
尝试: 使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。使用 --scan 运行以获得完整的见解。
获取更多帮助:https://help.gradle.org
2秒内构建失败
我的build.gradle在下面
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.google.firebase:firebase-core:16.0.3'
compile 'com.android.support:appcompat-v7:26.1.0'
compile "com.google.firebase:firebase-auth:16.0.3"
compile 'com.google.firebase:firebase-database:16.0.1'
compile 'com.google.android.gms:play-services-auth:16.0.0'
compile "com.google.firebase:firebase-storage:16.0.1"
compile 'com.google.firebase:firebase-core:16.0.3'
compile 'com.google.firebase:firebase-messaging:17.3.0'
compile 'com.android.support:multidex:1.0.0'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
compile 'jp.wasabeef:recyclerview-animators:2.2.5'
testCompile 'junit:junit:4.12'
compile 'io.realm:realm-android:0.82.1'
compile('com.facebook.android:facebook-android-sdk:+') {
exclude group: 'com.android.support', module: 'multidex'
}
compile 'com.google.code.gson:gson:2.2.+'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.miguelcatalan:materialsearchview:1.4.0'
compile 'com.google.firebase:firebase-ads:15.0.1'
compile 'com.github.silvestrpredko:dot-progress-bar:1.1'
compile 'com.wang.avi:library:2.1.3'
最佳答案
应用此插件
apply plugin: 'com.google.gms.google-services'
关于android - com.google.android.gms 版本不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52529237/