Reputation: 3045
After upgrading Google Play Service to 9.2.0, I am getting this error during a gradle sync.
Error:Failed to resolve: com.google.android.gms:play-services-measurement:9.2.0
How can I resolve this?
Upvotes: 8
Views: 3689
Reputation: 2356
Usually, you need to make 4 steps.
Update your local Google Repository. Run Android SDK manager, find Google Repository and update it to the latest version.
In your project level build.gradle add
dependencies {
classpath 'com.google.gms:google-services:3.0.0'
...
}
In your app level build.gradle add
dependencies {
compile 'com.google.android.gms:play-services-gcm:9.2.0'
compile 'com.google.android.gms:play-services-measurement:9.2.0'
//or any google library, which you are interested of
...
}
In your app level build.gradle add to the bottom of the file
apply plugin: 'com.google.gms.google-services'
Upvotes: 2
Reputation: 982
In the project level build.gradle file, update dependencies to
classpath 'com.google.gms:google-services:3.0.0'
Upvotes: 16