Reputation: 5986
I am trying to add Google Maps on my Android project and I was following this instructions: http://developer.android.com/google/play-services/setup.html
However, when I try to add
compile 'com.google.android.gms:play-services:5.0.77'
to my build.gradle
, AndroidStudio says
Dependency on Play Services, but the SDK installation does not have the "Extras > Google Repositories" installed. Open the SDK Manager and install it.
The problem is that I have it installed already:
I have already checked on File > Project Structure > Android SDK location and I am using the correct SDK path.
Any ideas?
Upvotes: 2
Views: 12484
Reputation: 5986
It happens that I was trying to add the dependency to the top-level build.gradle, where it somehow said I needed the Google Repository.
I added the code to the "inner" (application) build.gradle and it still did not work. I had to set my minimum SDK to 10 (instead of 8), so it worked.
Silly mistake, and it took me hours to figure out.
Upvotes: 1
Reputation: 1764
I had a similar issue with Android Studio and Android SDK manager. In my case Google Repository didn't show up in the list, so after searching a bit i ended up reinstalling Android Studio, and it worked.
I recommend you to wait a bit, maybe someone can provide a simpler solution. If you can't wait, just reinstall Android Studio. A clean updated installation should fix the problem.
Upvotes: 1