Lucky_girl
Lucky_girl

Reputation: 4883

Gradle: Error version conflict

I got such an error:

Error:Execution failed for task ':app:processDebugGoogleServices'.

Please fix the version conflict either by updating the version of the google-services plugin or updating the version of com.google.android.gms to 9.0.0.

How can I update google-service plugin or update version of com.google.android.gms? or what should I change in build.gradle?

My app/build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.1"

    defaultConfig {
        applicationId "com.example.test"
        minSdkVersion 15
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions{
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE-FIREBASE.txt'
        exclude 'META-INF/NOTICE'

    }
}

dependencies {
    compile 'com.android.support:appcompat-v7:23.1.1'

    // Firebase Authentication
    compile 'com.google.firebase:firebase-auth:9.4.0'

    // Google Sign In SDK (only required for Google Sign In)
    compile 'com.google.android.gms:play-services-auth:9.4.0'

    androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
    androidTestCompile 'com.android.support.test:runner:0.5'
}

apply plugin: 'com.google.ms.google-services'

Code of root build.grade:

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

    }
}

allprojects {
    repositories {
        jcenter()
    }
}

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

Upvotes: 0

Views: 139

Answers (1)

jt-gilkeson
jt-gilkeson

Reputation: 2721

You have a typo in your script:

apply plugin: 'com.google.ms.google-services'

should be

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

Upvotes: 1

Related Questions