android - com.google.android.gms 版本不匹配

标签 android android-studio

低于构建 错误:失败:构建因异常而失败。

  • 出了什么问题: 任务“: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/

相关文章:

android-studio - Android Studio - Dart 代码格式问题

android-studio - Gradle在Windows上找不到git.exe

java - 将可序列化对象传递给 Activity 时的转换无效

android - 在 kotlin 中,如何创建个人资料图像并在离线短信应用程序中将联系人姓名的第一个字母显示为个人资料图像?

android - EditText setInputType(InputType.TYPE_CLASS_NUMBER);不工作

android - 在 Android 中使用 DownloadManager 从标题中获取文件名

android - 错误的类文件魔法或版本

java - 使用 Java 的简单 Android Studio TextView 代码

java - SharedPreferences 是否合适,或者有更好的选择吗?

安卓工作室 : "Ok" button disabled in "Create new AVD" window