0

I have the next gradle file:

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


    }
}


dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'

    compile fileTree(dir: 'libs', include: ['*.jar'])

    testCompile 'junit:junit:4.12'
    compile 'org.apache.httpcomponents:httpcore:4.4.1'
    compile 'org.apache.httpcomponents:httpclient:4.5'
    compile 'org.apache.httpcomponents:httpcore:4.4.1'
    compile 'org.apache.httpcomponents:httpclient:4.5'
    compile 'com.android.support:design:23.2.1'
    compile 'com.loopj.android:android-async-http:1.4.4'

    compile 'com.google.android.gms:play-services-base:8.4.0'
    compile 'com.google.android.gms:play-services-location:7.3.0'

    compile 'com.google.gms:google-services:2.1.0-rc1'

}

I'm getting error in the lines starting with: compile 'com.google.android.gms

The error is:

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.

How I can know what version are available for this specific component?

Benjamin RD
  • 11,516
  • 14
  • 87
  • 157

1 Answers1

0

You should keep the version of com.google.android.gms libraries the same. If you are going to use v. 8.4.0 for the services.base, then you should always keep the others the same. So, you should also set services-location to the same version:

compile 'com.google.android.gms:play-services-base:8.4.0'
compile 'com.google.android.gms:play-services-location:8.4.0'

See Google Play Services for more version information.

Also, here is a similar question that is helpful for general Gradle setup as well: Version conflict updating to 8.4.0

Community
  • 1
  • 1
pczeus
  • 7,709
  • 4
  • 36
  • 51