19

Gradle project sync failed.

After update the android SDK I got this error:

Error:Failed to find: com.google.android.gms:play-services:5.2.8

  • I have checked that the sdk location which is updated is used by Android Studio
  • I've got Google Repository installed and Android Support Repository too all up to date.
  • Also I have a ANDROID_HOME local variable pointing to the sdk I'm actually using
Jason Aller
  • 3,541
  • 28
  • 38
  • 38
LinkOut
  • 273
  • 2
  • 4
  • 13

6 Answers6

39

try using com.google.android.gms:play-services:5.2.08 instead of 5.2.8.

you can also look for the right version number in your services directory:

.. /android-studio/sdk/extras/google/m2repository/com/google/android/gms/play-services/

user3792866
  • 414
  • 4
  • 3
31

Check your sdk extras packages, you need to install:

  • Google Play services
  • Google Repository

For me, the thing was that I didn't have the second one installed and then "---:5+" worked as described here:

https://developers.google.com/mobile-ads-sdk/docs/admob/android/quick-start

Shark Lasers
  • 441
  • 6
  • 15
Daniel Gomez Rico
  • 15,026
  • 20
  • 92
  • 162
0

You can now use

compile 'com.google.android.gms:play-services:6.1.11'
friederbluemle
  • 33,549
  • 14
  • 108
  • 109
0

I use

compile 'com.google.android.gms:play-services:6.1.+'

Even though it warns against it. If things go flakey after an update I'll revert back to the current version.

0

I had the same problem. I solved using:

compile 'com.google.android.gms:play-services:7.0.0'
André Luiz Reis
  • 2,273
  • 21
  • 14
0

Suggesting using Open File> Project Structure, click the "add (+)", searching for "play-service" to select the currently available version. Something like this image: https://i.stack.imgur.com/9Pv7j.jpg

Wesely
  • 1,425
  • 14
  • 23