所有gms / firebase库必须使用完全相同的版本

时间:2018-04-20 22:49:14

标签: android firebase

我确保Firebase库使用相同的版本。但是,它说:

All gms/firebase libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 15.0.0, 12.0.1. Examples include com.google.android.gms:play-services-ads-identifier:15.0.0 and com.google.android.gms:play-services-auth:12.0.

Gradle文件:

    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
            exclude group: 'com.android.support', module: 'support-annotations'
        })

        // Android Support
        implementation "com.android.support:appcompat-v7:$androidSupportVersion"
        implementation "com.android.support:customtabs:$androidSupportVersion"
        implementation "com.android.support:support-v4:$androidSupportVersion"
        implementation "com.android.support:design:$androidSupportVersion"
        implementation 'com.android.support.constraint:constraint-layout:1.1.0'
        implementation "com.android.support:cardview-v7:$androidSupportVersion"

        // Google Play & Firebase
        implementation "com.google.android.gms:play-services-location:15.0.0"
        implementation 'com.google.firebase:firebase-database:15.0.0'
        implementation 'com.firebaseui:firebase-ui:3.3.0'

        // Dagger
        implementation "com.google.dagger:dagger:$daggerVersion"
        annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"

        // Network
        implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
        implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
        implementation "com.squareup.retrofit2:adapter-rxjava:$retrofitVersion"
        implementation "com.squareup.okhttp3:okhttp:$okHttpVersion"
        implementation "com.squareup.okhttp3:okhttp-urlconnection:$okHttpVersion"
        implementation "com.squareup.okhttp3:logging-interceptor:$okHttpVersion"
        implementation "com.facebook.stetho:stetho:$stethoVersion"
        implementation "com.facebook.stetho:stetho-okhttp3:$stethoVersion"
        implementation "com.squareup.retrofit2:converter-scalars:$retrofitVersion"

        // RX
        implementation 'com.google.code.gson:gson:2.8.1'
        implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
        implementation 'io.reactivex.rxjava2:rxjava:2.1.6'

        // Misc
        implementation 'com.github.amarjain07:StickyScrollView:1.0.2'
        implementation 'com.yakivmospan:scytale:1.0.1'
        implementation "com.jakewharton:butterknife:$butterKnifeVersion"
        annotationProcessor "com.jakewharton:butterknife-compiler:$butterKnifeVersion"
        implementation 'com.github.jkwiecien:EasyImage:2.0.3'
        implementation 'com.squareup.picasso:picasso:2.5.2'
        implementation 'com.github.ganfra:material-spinner:2.0.0'
        implementation 'me.zhanghai.android.materialprogressbar:library:1.4.2'
        implementation("com.github.hotchemi:permissionsdispatcher:$permissonDispatcherVersion") {
            exclude module: "support-v13"
        }
        annotationProcessor "com.github.hotchemi:permissionsdispatcher-processor:$permissonDispatcherVersion"
        implementation 'com.facebook.rebound:rebound:0.3.8'
        implementation 'com.github.stfalcon:chatkit:0.2.2'
        implementation 'nl.dionsegijn:konfetti:1.1.0'
        implementation group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.56'
        implementation 'com.android.support:multidex:1.0.3'
}

1 个答案:

答案 0 :(得分:1)

检查您的传递依赖关系。

简单地运行

gradlew [module]:dependencies 

这将打印所有依赖项及其依赖项的列表。 可能是你的顶级依赖关系之一"包括旧版本。

解决方案是通过以下方式排除这些:

implementation("com.example.m:m:1.0") { 
  exclude group: "org.unwanted", module: "x"
}