【问题标题】:Error: fix the version conflict (google-services plugin 11.6.0)错误:修复版本冲突(google-services 插件 11.6.0)
【发布时间】:2018-02-20 14:28:26
【问题描述】:

我正在尝试将 GoogleSignIn 用于应用,但我无法解决此问题。我读到要使用 GoogleSignIn 类,您应该使用 e 'com.google.android.gms:play-services-auth:11.6.0' 版本,所以我将我的 gradle 更新为:

dependencies {
implementation 'com.google.firebase:firebase-messaging:10.2.6'
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'

compile 'com.crystal:crystalrangeseekbar:1.0.0'
compile 'com.mikhaellopez:circularimageview:3.0.2'
compile 'com.estimote:sdk:0.11.0@aar'
compile 'com.google.code.gson:gson:2.7'
compile 'com.facebook.android:facebook-android-sdk:4.23.0'
compile 'com.google.android.gms:play-services-maps:11.6.0'
compile 'com.google.android.gms:play-services-location:11.6.0'
compile 'com.google.android.gms:play-services-auth:11.6.0'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.google.firebase:firebase-messaging:11.6.0'
compile 'com.gtomato.android.library:carouselview:2.0.1'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.squareup.okhttp3:okhttp:3.8.1'
compile 'com.google.gms:google-services:3.2.0'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.github.bumptech.glide:glide:4.0.0-RC1'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC1'
}

但我一遍又一遍地犯同样的错误。关于如何解决它的任何想法?顺便说一句,我也有这个。

buildscript {
ext.kotlin_version = '1.1.51'
repositories {
    google()
    jcenter()
    maven {
        url 'https://maven.google.com'
    }
}

dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    classpath 'com.google.gms:google-services:3.2.0'

}}

消息:

错误:任务 ':app:processDebugGoogleServices' 执行失败。

请通过更新 google-services 插件的版本(有关最新版本的信息可在 https://bintray.com/android/android-tools/com.google.gms.google-services/ 获得)或将 com.google.android.gms 的版本更新到 11.6.0 来解决版本冲突。

【问题讨论】:

  • 你错过了一个。 firebase:firebase-messaging:10.2.6,反正是另一个的重复,所以你可以删除它
  • 另外,compile 'com.google.gms:google-services 不应该与其他库一起存在,并且您有两个依赖项块?
  • @cricket_007 我更新了我的问题。我没有两个依赖块。最后一个来自Module:app。
  • 好吧,你看到我的其他评论了吗?
  • 是的,我没有看到 firebase 行

标签: android gradle


【解决方案1】:

您应该为 google play 服务库和 firebase 库使用相同的版本。
变化:

implementation 'com.google.firebase:firebase-messaging:10.2.6'

implementation 'com.google.firebase:firebase-messaging:11.6.0'

【讨论】:

    猜你喜欢
    • 2018-01-12
    • 1970-01-01
    • 2018-03-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多