chdryra
chdryra

Reputation: 523

Updating Google Play Services from 8.4.0 to 9.2.1 causes Gradle sync error

When I update my Google Play dependencies in my Gradle file from version 8.4.0 to 9.2.1, I get the following error:

Error:Failed to resolve: com.google.android.gms:play-services-measurement:9.2.1

This was not an issue when using version 8.4.0. I tried to include it as an explicit dependency but makes no difference. The specific dependencies I’m using are:

compile 'com.google.android.gms:play-services-maps:9.2.1'
compile 'com.google.android.gms:play-services-auth:9.2.1'
compile 'com.google.android.gms:play-services-plus:9.2.1'

I would be grateful for any pointers on why this is happening.

Upvotes: 12

Views: 5988

Answers (2)

Irfan Qureshi
Irfan Qureshi

Reputation: 369

Add the dependency to your project-level build.gradle:

dependencies {
        classpath 'com.android.tools.build:gradle:2.1.3'

        classpath 'com.google.gms:google-services:3.0.0'
    }

Upvotes: 0

kwz
kwz

Reputation: 701

Try update google-services plugin in main build.gradle file

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

Upvotes: 13

Related Questions