Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 814
Aman Jain Avatar asked Jul 01 '16 08:07

Aman Jain


2 Answers

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

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

like image 139
LokiDroid Avatar answered Oct 17 '22 03:10

LokiDroid


Usually, you need to make 4 steps.

  1. Update your local Google Repository. Run Android SDK manager, find Google Repository and update it to the latest version.

  2. In your project level build.gradle add

    dependencies {
        classpath 'com.google.gms:google-services:3.0.0'
        ...
    }
    
  3. 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
       ...
    }
    
  4. In your app level build.gradle add to the bottom of the file

    apply plugin: 'com.google.gms.google-services'
    
like image 25
Michael Katkov Avatar answered Oct 17 '22 02:10

Michael Katkov