Failed to resolve: com.google.android.gms:play-services-measurement:9.6.1
Today I had the same problem. This solved the problem for me:
Open the stand alone Android SDK Manager. In the Extras section the "Google Play Services" were at the latest version, but the "Google Repository" after updating the "Google Repository" from version 33 to 35, the problem was gone.
Finally, I solved it myself. Here is what I did:
- Removed
compile 'com.google.android.gms:play-services-measurement:9.6.1'
and then compiled the project - It gives
missing api_key error
becauseGCM
got shifted toFirebase
and so thegoogle-services.json
file does not work - To fix this, simply update the
google-services.json
file with the new generated file which uses Cloud messaging from Firebase - After this, I compiled and got another error that
@drawable/powered_by_google_dark
is missing from the project as I am using Places Autocomplete API. To fix this, addcompile 'com.google.android.gms:play-services-places:9.6.0'
to dependencies
You don't have the latest google play services, just click the link and android studio will offer a dialog to install it.