How can I determine the version of Google Play services?
Solution 1
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
Solution 2
You can see which version you have in project structure - dependecies - click on plus in right cornner - libary dependencies
and just add it to build.gradle with click or manually:
compile 'com.google.android.gms:play-services:6.5.87'
Related videos on Youtube
![Red Cricket](https://i.stack.imgur.com/LFxFQ.jpg?s=256&g=1)
Red Cricket
I LOVE stackoverflow.com ... I am a support of the perlmonks too.
Updated on June 04, 2022Comments
-
Red Cricket about 2 years
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: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>
-
Red Cricket over 9 yearsThis is the closest answer so far. Actually I found the version here: c:\Users\Leila001\AppData\Local\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\version.xml
-
Jared Burrows over 9 yearsYes! That is in there as well. That is why I left the "gms/play-services/" folder at a higher level. Basically Google has you download the .jars through the SDK manager and you bring them in locally.
-
cmcromance over 8 yearsThank you sooooo much! I really wanted to know about the all version names!
-
cmcromance over 8 yearsAnd one more thing! We can get the release note of all versions! Here! developers.google.com/android/guides/releases
-
Programmer about 8 years@RedCricket I went to the path you said but it has information like <integer name="google_play_services_version">8487000</integer> . so what is the version like 6.5.87 ? I want to add this google-play service library in gradle
-
Jared Burrows about 8 years@Programmer
6.5.87
is an older version. Use the latest8.4.0
. Use one of the modules such asplay-services-analytics
.