Reputation: 454
I launched my android studio and found that the following lines in the dependencies section of build.gradle are not compiling:
compile 'com.google.android.gms:play-services-base:6.5.+'
compile 'com.google.android.gms:play-services-identity:6.5.+'
Gradle Sync tells me that it cannot resolve the packages. I know the newest version of play-services is 7.8.0 but I'm not sure if this is related to that in any way. Any advice?
EDIT: I should mention that if I use 7.8.0, gradle does not complain, as it can find the package. However the methods I am using in my app that pertain to play services become invalid, as Google has updated how their Cloud Messaging works.
Upvotes: 1
Views: 2868
Reputation: 2066
In the folder
Android/Sdk/extras/google/m2repository/com/google/android/gms/play-services-base
open the maven-metadata.xml file
and add the <version>6.5.87</version>
under section <versions>
. It may look like below
<versions>
<version>6.5.87</version>
<version>7.0.0</version>
<version>7.3.0</version>
<version>7.5.0</version>
</versions>
Do the same for Android/Sdk/extras/google/m2repository/com/google/android/gms/play-services-identity
Note: Usually Android SDK in your HOME folder.
Upvotes: 4
Reputation: 11749
You probably need to download the play services package.
Go to Tools
-> Android
-> SDKManager
In the Extra section at the bottom of the list, make sure you have Google Play Services
marked as installed.
If you use the latest android studio, once you open the SDKManager, go to the SDK Tools and make sure Google Play Services is checked.
Upvotes: 2