How to download older google play services?

I realise that this is an old question, but I had the same problem today (for real devices not for the emulator) and have found a solution.

I know that you can add code to prompt the user to upgrade to the latest version (see the comment by @nathan-walters) but, for complicated reasons, in my case I need to work with whatever version the user already has installed on their device (if any) and hence prefer to compile/build with an older version of the client library (google-play-services_lib)

So researching further, I unpacked the xml that Android SDK Manager uses to find and install the 'extras' packages including the latest version of Google Play Services.
If you are interested start here: https://dl-ssl.google.com/android/repository/addon.xml

For the current version (as of Nov 10th 2014) that gives you the library for google-play-services_lib at:

https://dl-ssl.google.com/android/repository/google_play_services_6171000_r21.zip

The older versions are in the same location on the google servers (although they could disappear at any time), so if you are prepared to move the current installed library aside and manually unpack an older zip then you can install an old version. I found the following:

  • https://dl-ssl.google.com/android/repository/google_play_services_3159130_r09.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_3225130_r10.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_3265130_r12.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_4030530_r13.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_4132530_r14.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_4242030_r15.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_4323030_r16.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_4452030_r17.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_5077000_r18.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_5089000_r19.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_6111000_r20.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_6171000_r21.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_6587000_r22.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_7095000_r23.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_7327000_r24.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_7571000_r25.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_7895000_r26.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_8115000_r27.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_8298000_r28.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_8487000_r29.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_9080000_r30.zip

The same technique would allow you to test against the non-upgradable older versions Google Maps (Google Play Services) hardwired in older versions of the emulator. I haven't tested all these versions against the emulator but have successfully tested Google Maps in the emulator for an AVD based on Google APIs (API 19).

Google does make the occasional attempt to bring the emulator up to date. Here is an issue tracker thread discussing version incompatibility issues between the client library and the emulator and google's various attempts to fix them: https://code.google.com/p/android/issues/detail?id=57880

[UPDATE:]

@btrue see answer below now has a much better answer than my answer

go to:

<your path to android sdk>/extras/google/m2repository/com/google/android/gms/play-services/

where you will find directories containing the old releases in AAR format - just rename to .zip for extraction.


The accepted answer is too much trouble. Google actually does distribute old versions in the SDK manager.
Under "Extras", there is "Google Repository".
In the repository is GPS libs going back to version 3.1.36.
They are in AAR format, which is just a zip of the build project.
Change the name to *.zip, unzip it, inside is a classes.jar, which is the jar of all the gps classes.
If you don't need any of the resources, you can add the jar file to your classpath. Done.

ls -l /Applications/Programming/adt-bundle-mac-x86_64-20140702/sdk/extras/google/m2repository/com/google/android/gms/play-services/
total 24
drwxr-xr-x+  8 Norrin  staff  272 Jan 13 01:08 3.1.36
drwxr-xr-x+  8 Norrin  staff  272 Jan 13 01:08 3.1.59
drwxr-xr-x+  8 Norrin  staff  272 Jan 13 01:08 3.2.25
drwxr-xr-x+  8 Norrin  staff  272 Jan 13 01:08 3.2.65
drwxr-xr-x+ 11 Norrin  staff  374 Feb 10 20:09 4.0.30
drwxr-xr-x+  8 Norrin  staff  272 Jan 13 01:08 4.1.32
drwxr-xr-x+  8 Norrin  staff  272 Jan 13 01:08 4.2.42
drwxr-xr-x+  8 Norrin  staff  272 Jan 13 01:08 4.3.23
drwxr-xr-x+  8 Norrin  staff  272 Jan 13 01:08 4.4.52
drwxr-xr-x+  8 Norrin  staff  272 Jan 13 01:08 5.0.89
drwxr-xr-x+  8 Norrin  staff  272 Jan 13 01:08 6.1.11
drwxr-xr-x+  8 Norrin  staff  272 Jan 13 01:08 6.1.71
drwxr-xr-x+  8 Norrin  staff  272 Feb  4 13:43 6.5.87
-rw-r--r--+  1 Norrin  staff  703 Jan 13 01:08 maven-metadata.xml
-rw-r--r--+  1 Norrin  staff   32 Jan 13 01:08 maven-metadata.xml.md5
-rw-r--r--+  1 Norrin  staff   40 Jan 13 01:08 maven-metadata.xml.sha1

you can download google play services for froyo in the SDK Manager which works with SDK 8 and up but to get a specific version is not possible AFAIK. The current google play service works with 10 and up