I've got a clean Android project with Google Play services rev. 13 installed through the SDK manager, following these instructions.
My build.gradle
file is as follows:
dependencies { compile 'com.google.android.gms:play-services:4.0.30' }
However, when I attempt to build this app, I get
Gradle: A problem occurred configuring project ':Maple'. > Failed to notify project evaluation listener. > Could not resolve all dependencies for configuration ':Maple:_DebugCompile'. > Could not find com.google.android.gms:play-services:4.0.30. Required by: MapleProject:Maple:unspecified
Why is my Gradle not syncing? Delete "build" folder from project's root folder. Then do "invalidate cache and restart". This will restart your Android Studio and then build the app again, will solve the issue.
In some cases when your Gradle files are deleted or corrupted you will not be able to download new Gradle files in android studio. In this case, we have to delete the Gradle files which are present already and then again sync your project to download our Gradle files again.
The google-services. json file is generally placed in the app/ directory (at the root of the Android Studio app module).
Install the Google Repository in the SDK manager.
Even if you have installed Google Repository in SDK Manager, you might still see the same error.
Another possible solution is to downgrade your version.
For example, instead of
compile 'com.google.android.gms:play-services:11.2.0'
Do
compile 'com.google.android.gms:play-services:11.0.4'
Notice 11.2.0 is advertised in Google's Set up Google Play Services page but it does not work for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With