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

12,890

Solution 1

You have to update Application level build.gradle to classpath 'com.google.gms:google-services:3.0.0' from 2.x.x. Hope this will help

Solution 2

Update your android sdk manager - Google repository version to 28 & Google play services to 30. It will work fine.

Solution 3

If anyone has this problem and have updated SDK and still isnt working my fix was the google play services version in my build code read 'com.google.android.gms:play-services:9.8.00' and I changed it to 'com.google.android.gms:play-services:9.8.0'

Solution 4

I resolved this problem by uninstall Google Repository from SDK Manager then install it again. Hope this helps

Share:
12,890
Marcel
Author by

Marcel

Updated on January 05, 2020

Comments

  • Marcel
    Marcel over 4 years

    I didn't find out what's causing the problem below. Could you help me, please?

    Error:Failed to resolve: com.google.android.gms:play-services-measurement:9.0.2 Install Repository and sync project
    Open File
    Show in Project Structure dialog

    • mbmc
      mbmc almost 8 years
      Could you show your app's build.gradle?
    • mthakuri
      mthakuri over 7 years
      If my answer resolved your question, then can you accept it, so it could be helpful for others.
  • EsotericRider
    EsotericRider over 7 years
    Thank you so much! been trying to solve this for hours
  • Will Vanderhoef
    Will Vanderhoef over 7 years
    This will require you require you to generate a new google-service.json for your app if upgrading from 8.x.x or earlier. Head to console.firebase.google.com and to your project settings to generate an updated version.
  • Can Uludağ
    Can Uludağ over 7 years
    Thanks a lot! Removing the last '0' solved the problem. Must be com.google.android.gms:play-services:9.8.0
  • LoveForDroid
    LoveForDroid over 7 years
    @Andrew My sdk is up to date (Google Repository Rev 32 & Google Play Services Rev 32) in Application level build.gradle I have "compile 'com.google.android.gms:play-services-location:9.8.0'" Still I am getting error: Failed to resolve: com.google.android.gms:play-services-location:9.8.0