Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I determine the version of Google Play services?

I am migrating from Eclipse to Android Studio. I have a project that I imported into Android Studio that uses Google Play Services, so I am following the documentation I found here: http://developer.android.com/google/play-services/setup.html This documentation says that I need to edit my build.gradle file. They give the example:

apply plugin: 'com.android.application'
...

dependencies {
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile 'com.google.android.gms:play-services:6.5.87'
}

Also the documentation mentions, "Be sure you update this version number each time Google Play services is updated.", which I assume is 6.5.87 in the above example. So how do I determine the "version" Google Play Services I have installed with my Android SDK manager. Here is a screen shot of my android sdk:

enter image description here

So my Android SDK Manager tells me I have installed "Revision" so what do I put in my build.gradle file?

    compile 'com.google.android.gms:play-services:6.5.22'

... or maybe ...

    compile 'com.google.android.gms:play-services:22'

Any help appreciated!

UPDATE: Thank you for all your answers.

I was able to find the version like so:

Leila001@win8 ~/Windows_Home/AppData/Local/Android/android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/res/values
$ cat version.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <integer name="google_play_services_version">6587000</integer>
</resources>
like image 687
Red Cricket Avatar asked Feb 14 '15 03:02

Red Cricket


People also ask

How do I update Google Play Services without Google Play?

To update Google Play Services on your Android device, head to the "Apps & Notifications" menu in your settings. Google Play Services let your Android apps connect to the internet and communicate with Google. Updating Google Play Services can fix app issues, and help your Android device run faster.


1 Answers

You have the right idea by checking to make sure you do not have any updates.

The easiest way to check is simply when you have the latest downloaded in the Android SDK(locally).

I am using Mac OSX:

~/android-sdk/extras/google/m2repository/com/google/android/gms/play-services/

If you look where you have YOUR-ANDROID-SDK/extras/google/m2repository/com/google/android/gms/play-services/, you will see all the versions downloaded that you have.

The latest one being 6.5.87. (compile 'com.google.android.gms:play-services:6.5.87')

For you, the directory path on Windows would be:

C:\Users\Leila001\AppData\Local\Android\extras\google\m2repository\com\google\android\gms\play-services
like image 50
Jared Burrows Avatar answered Sep 19 '22 16:09

Jared Burrows