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?
In the project level build.gradle file, update dependencies to
classpath 'com.google.gms:google-services:3.0.0'
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'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With