Jake Moritz
Jake Moritz

Reputation: 873

Failed to build Android project with Google Play services

I'm in the process of incorporating Google sign-in into my app, but I'm getting errors in Android Studio when trying to build the project. I'm including 'com.google.android.gms:play-services-auth:9.0.2' as a dependency in my app-level gradle file and 'com.google.gms:google-services:2.0.0-alpha6' as a dependency in my project-level gradle file. Building the project gives me the error: Error:Failed to resolve: com.google.android.gms:play-services-measurement:9.0.2 with an option to "Install Repository and sync project", but clicking this option does nothing. I have apply plugin: 'com.google.gms.google-services' at the end of the app-level gradle file. There are no other instances where I'm using com.google.android.gms:play-services-* dependencies. I have "Google Play services" installed via the SDK Manager. Any help would be appreciated and I can provide more information as needed.

Upvotes: 5

Views: 3314

Answers (2)

Rahul Sonone
Rahul Sonone

Reputation: 2745

For me its asking to download one repository I have downloaded that and then sync again it worked for me.

Upvotes: 0

Ammonious
Ammonious

Reputation: 288

I updated the project-level build.gradle to

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

and it worked for me. Hope that helps!

Upvotes: 20

Related Questions