请通过更新google-services插件或updati的版本来修复版本冲突

时间:2017-01-13 09:19:54

标签: android android-gradle

我尝试将Firebase添加到我的应用中,就像教程一样。 我收到此错误:

  

错误:任务':app:processDebugGoogleServices'执行失败。   请通过更新google-services插件的版本(https://bintray.com/android/android-tools/com.google.gms.google-services/提供有关最新版本的信息)或将com.google.android.gms的版本更新为9.4.0来修复版本冲突。

我的分数。

build.gradle(项目):

    // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
mavenCentral()
        maven { url 'https://maven.fabric.io/public' }
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.2'

        classpath 'io.fabric.tools:gradle:1.+'
        classpath 'com.google.gms:google-services:3.0.0'

    }
}


allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io"}
    }
}

build.gradle(app):

dependencies {

    //compile 'com.google.android.gms:play-services:8.3.0'
    compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
        transitive = true;
    }
    compile files('libs/NativeXMonetizationSDK_v5.4.12.jar')
    compile files('libs/Parse-1.3.8.jar')
    compile files('libs/SuperRewards-3.1b.jar')
    compile files('libs/TrialpayAndroidSdk.jar')
    compile files('libs/acra-4.5.0.jar')
    compile files('libs/adcolony.jar')
    compile 'pl.bclogic:pulsator4droid:1.0.3'

    compile 'com.google.firebase:firebase-core:9.4.0'
    compile 'com.google.firebase:firebase-messaging:9.4.0'

    compile 'com.google.android.gms:play-services-auth:10.0.1'

    compile 'com.mcxiaoke.volley:library:1.0.18'
    compile 'uk.co.chrisjenx:calligraphy:2.2.0'
    compile files('libs/adscendmedia1.0.1.jar')
    compile files('libs/dagger-1.2.2.jar')
    compile 'com.github.leonardoxh:custom-font:1.2'


    compile 'com.github.leonardoxh:custom-font:1.2'
    compile 'com.github.chrisbanes:PhotoView:1.2.6'


    compile files('libs/javax.inject-1.jar')
    compile files('libs/mediationsdk-6.2.2.jar')
    compile files('libs/nineoldandroids-2.4.0.jar')
    compile files('libs/personasdk1.1.jar')
    compile files('libs/picasso-2.4.0.jar')
    compile files('libs/tapjoyconnectlibrary.jar')
    compile files('libs/vungle-publisher-adaptive-id-3.3.1.jar')
    compile files('libs/chartboost.jar')
    compile files('libs/applovin-sdk-6.1.5.jar')
    compile files('libs/heyzap.jar')
    compile files('libs/revmob.jar')
    compile project(':appGradeLib')
    //compile project(':sensiblefacebooksdk')
    compile project(':googleplayserviceslib')
    compile files('libs/AdxmiCustomizedSdk_v1.2.0_2015-11-13.jar')
    compile files('libs/AdxmiSdk_v5.4.0_2015-11-12.jar')
    compile project(':unity-ads')
    compile files('libs/org.apache.http.legacy.jar')

    compile 'com.facebook.android:facebook-android-sdk:4.+'
    compile 'com.google.code.gson:gson:2.3.1'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.vstechlab.easyfonts:easyfonts:1.0.0'
    compile 'com.febaisi:custom-textview:0.0.3'
    compile 'com.scopely:fontain:1.0.0'

    compile 'com.android.support:design:25.0.0'
    compile 'com.android.support:support-v4:25.0.0'
    compile 'com.android.support:appcompat-v7:25.0.0'

}
apply plugin: 'com.google.gms.google-services'

2 个答案:

答案 0 :(得分:2)

您使用的是旧版Firebase库。 这些是最新的:

compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-messaging:10.0.1'

答案 1 :(得分:2)

 compile 'com.google.firebase:firebase-core:9.4.0'
 compile 'com.google.firebase:firebase-messaging:9.4.0'
 compile 'com.google.android.gms:play-services-auth:10.0.1'

使用相同版本(所有9.4.0或全部10.0.1)制作Google服务