Error: Failed to execute: com.google.android.gms: play-services-measurement: 9.2.0

After upgrading the Google Play service to 9.2.0, I get this error during gradle synchronization.

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

How can i solve this?

+8
android android-gradle google-play-services
source share
2 answers

In the build.gradle file at the project level, update the dependencies

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

+16
source share

Usually you need to take 4 steps.

  • Update your local Google repository. Launch the Android SDK manager, find the Google Repository and update it to the latest version.

  • At the project level build.gradle add

     dependencies { classpath 'com.google.gms:google-services:3.0.0' ... } 
  • At your build.gradle application level 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 application level build.gradle add at the end of the file

     apply plugin: 'com.google.gms.google-services' 
+2
source share

All Articles