Shahbaz Sheikh Shahbaz Sheikh - 3 months ago 27
Android Question

Cannot resolve com.google.android.gms:play-services-base:6.5.+

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.

Answer

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.

Comments