898247
898247

Reputation: 10606

Gradle unable to resolve Play services dependency

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

Upvotes: 32

Views: 10568

Answers (3)

Clint
Clint

Reputation: 1094

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.

Upvotes: 4

898247
898247

Reputation: 10606

Install the Google Repository in the SDK manager.

Upvotes: 92

Maddy
Maddy

Reputation: 326

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)

Upvotes: -1

Related Questions