Artem
Artem

Reputation: 4639

Error "Please fix the version conflict either by updating the version of the google-services plugin

I tried use Firebase Cloud Messaging in my app and i get this error:

Error:Execution failed for task ':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 9.0.0.

My project gradle:

buildscript {
    repositories {
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.3'
        classpath 'com.google.gms:google-services:3.0.0'  

    }
}

allprojects {
    repositories {
        jcenter()
        mavenLocal()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

My module gradle:

 buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}


android {
    compileSdkVersion 24
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.nashkvartal"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
        transitive = true;
    }
    compile 'com.android.support:appcompat-v7:24.2.0'
    compile 'com.android.support:design:24.2.0'
    compile 'com.android.support:support-v4:24.2.0'
    compile 'com.loopj.android:android-async-http:1.4.9'
    compile 'com.google.code.gson:gson:2.6.1'
    compile 'com.facebook.android:facebook-android-sdk:4.+'
    compile 'com.vk:androidsdk:+'
    compile 'com.google.android.gms:play-services-auth:9.4.0'
    compile 'com.roughike:bottom-bar:1.3.3'
    compile 'com.google.android.gms:play-services-appindexing:9.4.0'
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
}

How can I fix it error?

Upvotes: 0

Views: 1807

Answers (1)

sumandas
sumandas

Reputation: 565

As the error says, please downgrade the version to 9.0.0 in module gradle and hopefully it would work:

compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.android.support:design:24.2.0'
compile 'com.android.support:support-v4:24.2.0'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.google.code.gson:gson:2.6.1'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.vk:androidsdk:+'

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

compile 'com.roughike:bottom-bar:1.3.3'

compile 'com.google.android.gms:play-services-appindexing:9.0.0'

compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'

Upvotes: 1

Related Questions