ahmad
ahmad

Reputation: 39

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

Trying to implement GCM notifications, got the conflict 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 8.3.0.**

dependencies {
compile project(':viewPagerIndicator')
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'org.apache.httpcomponents:httpclient:4.5'
compile 'com.android.support:recyclerview-v7:24.2.0'
compile 'com.google.android.gms:play-services:9.4.0'
compile 'com.facebook.android:facebook-android-sdk:4.0.0'
compile 'com.koushikdutta.ion:ion:2.+'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.android.support:multidex:1.0.0'
compile 'com.google.android.gms:play-services-ads:9.4.0'
compile 'com.google.android.gms:play-services-auth:9.4.0'
compile 'com.google.android.gms:play-services-gcm:9.4.0'
//classpath 'com.splunk:mint-gradle-android-plugin:5.1.0'
//  compile 'com.splunk:mint-android-sdk:5.1.0'
//compile 'com.splunk:mint-android-instrumentation-okhttp:5.1.0'
compile 'com.splunk.mint:mint:5.0.0'

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

Here is my Application Gradle

buildscript {
repositories {
    jcenter()
 maven{
url "https://mint.splunk.com/gradle/"
 }
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.1.3'
    classpath 'com.google.gms:google-services:1.5.0-beta2'
    classpath 'com.android.tools.build:gradle:2.0.0-alpha6'

}
}

Upvotes: 0

Views: 3273

Answers (2)

Gabriele Mariotti
Gabriele Mariotti

Reputation: 364868

Since you are using the v.9.4.0 you have to use the v.3.0.0 of the google play services plugin:

dependencies {
    classpath 'com.android.tools.build:gradle:2.1.3'
    classpath 'com.google.gms:google-services:3.0.0'
}

Upvotes: 1

Akram
Akram

Reputation: 2198

There should be a more explanatory error log in your logcat. It appears before this error message Error:Execution failed for task ':app:processDebugGoogleServices which you reported. Please post the complete error log message.

Also, I see that you have two dependencies for gradle in your application gradle; this classpath 'com.android.tools.build:gradle:2.1.3' and this classpath 'com.android.tools.build:gradle:2.0.0-alpha6' . I suggest to keep only classpath 'com.android.tools.build:gradle:2.1.3' and ALSO add classpath 'com.google.gms:google-services:1.3.0-beta1' in this gradle.

Check your cradle-wrapper.properties to contain distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip or distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip instead of those alpha releases.

If the problem still remains, please post the complete error message (preferably the whole log in your logcat) plus build-tools, targetsdk and compileSdk version of your module gradle file.

Upvotes: 0

Related Questions