Skip to content Skip to sidebar Skip to footer

Google Services Conflict Error

Am trying to build my project but suddenly started getting this frustrating error on my log cat about google services version conflict. I have tried all the possible solutions onli

Solution 1:

I finally solved this problem by removing this line from my build.gradle(project) module.

  classpath 'com.google.gms:google-services:3.1.1'

Solution 2:

Error

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.

Reason

apply plugin: 'com.google.gms.google-services'
compile files('libs/YouTubeAndroidPlayerApi.jar')

Remove YouTubeAndroidPlayerApi.jar from your local lib folder and add

compile'com.google.apis:google-api-services-youtube:v3-rev187-1.23.0'

with

 repositories {
    mavenCentral()
}

Finally

 apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "26.0.1"
    defaultConfig {
        applicationId "com.example.app"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    repositories {
    mavenCentral()
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile project(path: ':Material-Color-Picker-master')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile'com.google.apis:google-api-services-youtube:v3-rev187-1.23.0'compile'com.android.support:appcompat-v7:25.3.1'compile'com.android.support.constraint:constraint-layout:1.0.2'compile'com.android.support:design:25.3.1'compile'com.google.android.gms:play-services-maps:11.6.0'compile'com.google.firebase:firebase-crash:11.6.0'compile'com.google.firebase:firebase-database:11.6.0'compile'com.google.firebase:firebase-messaging:11.6.0'
    testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

Then Clean-Rebuild-Run.

Post a Comment for "Google Services Conflict Error"