32

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
Community
  • 1
  • 1
Randall Ma
  • 10,486
  • 9
  • 37
  • 45

3 Answers3

92

Install the Google Repository in the SDK manager.

Randall Ma
  • 10,486
  • 9
  • 37
  • 45
4

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.

Clint
  • 1,014
  • 1
  • 10
  • 15
-1

Are you testing on Avd (Emulator or device ?) If emulator please check below: I resolved this issue by creating a new avd with target version as : Google APIs(GoogleInc) API Level 18. (platform 4.3 google api required)

Maddy
  • 316
  • 1
  • 6
  • 14