Im going to use android google maps v2
with android emulator/android studio 0.4.0
. One of requirements is to put in project google-play-services_lib
with version lower/equal to emulator
level. My emulator works with api lv 17
. The question is, how to download older version of google-play-services_lib
than those downloaded by android sdk manager
?
我将使用android谷歌地图v2和android模拟器/android studio 0.4.0。其中一个要求是将google-play-services_lib项目放在较低/等于仿真器级别的版本中。我的仿真器与api lv 17一起工作。问题是,如何下载比android sdk管理器下载的更老版本的google-play-services_lib ?
4 个解决方案
#1
88
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)
我知道你可以添加代码提示用户升级到最新版本(见注释@nathan-walters),但由于复杂的原因,在我的例子中我需要使用任何版本的用户已经安装在他们的设备(如果有的话),因此更倾向于编译/构建一个旧版本的客户端库(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
因此,我进一步研究了Android SDK管理器用来查找和安装附加包的xml,其中包括最新版本的谷歌Play服务。如果您有兴趣,请从这里开始:https://dlssl.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:
当前版本(截止2014年11月10日)为您提供google-play-services_lib库:
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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_8487000_r29.zip
- https://dl-ssl.google.com/android/repository/google_play_services_9080000_r30.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).
同样的技术可以让您测试无法升级的旧版本谷歌Maps(谷歌Play Services),它是在模拟器的旧版本中硬连接的。我还没有在模拟器上测试所有这些版本,但是已经成功地在模拟器中测试了谷歌映射,以支持基于谷歌API的AVD (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
谷歌偶尔也会尝试更新模拟器。下面是一个问题跟踪线程,讨论客户机库和仿真器之间的版本不兼容性问题,以及谷歌试图修复它们的各种尝试:https://code.google.com/p/android/issues/detail?id=57880
[UPDATE:]
(更新:)
@btrue see answer below now has a much better answer than my answer
@btrue请看下面的回答现在有一个比我更好的答案
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.
您将在其中找到包含AAR格式的旧版本的目录——只需将其重命名为.zip以进行提取。
#2
14
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.
公认的答案太麻烦了。谷歌实际上在SDK管理器中分发旧版本。在“附加”项下,有“谷歌存储库”。在存储库中,GPS libs返回到3.1.36版本。它们是AAR格式,这只是构建项目的一个压缩包。将名称改为*。zip,解压它,里面是一个类。jar,是所有gps类的jar。如果不需要任何资源,可以将jar文件添加到类路径中。完成了。
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
#3
1
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
您可以在SDK管理器中为froyo下载谷歌游戏服务,它与SDK 8一起工作,但是要得到一个特定的版本是不可能的。当前的谷歌播放服务可以使用10或以上版本
#4
1
One of requirements is to put in project google-play-services_lib with version lower/equal to emulator level.
其中一个要求是将google-play-services_lib项目放在较低/等于仿真器级别的版本中。
google-play-services_lib
has nothing to do with emulator versions.
google-play-services_lib与模拟器版本没有任何关系。
The question is, how to download older version of google-play-services_lib than those downloaded by android sdk manager?
问题是,如何下载比android sdk管理器下载的更老版本的google-play-services_lib ?
AFAIK, there is no way to do this. Furthermore, as has been pointed out, this is not necessary.
阿法伊克,这是不可能的。此外,正如所指出的,这是不必要的。
Then If your device were broken or anything you would have no ability to test your program
如果你的设备坏了或者有什么问题,你就不能测试你的程序了
That makes no sense whatsoever. google-play-services_lib
is a library. It is not Google Play Services itself, but a client library for utilizing Google Play Services.
这毫无意义。google-play-services_lib是一个图书馆。它不是谷歌播放服务本身,而是用于使用谷歌播放服务的客户端库。
But then I need to use support library what I would like to avoid
但是我需要使用支持库来避免
As has been noted, the Android Support package is not tied to the Play Services SDK. Parts of the Play Services SDK can use the Android Support package (e.g., SupportMapFragment
), but the Play Services SDK does not require the Android Support package.
如前所述,Android支持包不与Play Services SDK绑定。Play服务SDK的一部分可以使用Android支持包(例如,SupportMapFragment),但是Play服务SDK并不需要Android支持包。
#1
88
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)
我知道你可以添加代码提示用户升级到最新版本(见注释@nathan-walters),但由于复杂的原因,在我的例子中我需要使用任何版本的用户已经安装在他们的设备(如果有的话),因此更倾向于编译/构建一个旧版本的客户端库(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
因此,我进一步研究了Android SDK管理器用来查找和安装附加包的xml,其中包括最新版本的谷歌Play服务。如果您有兴趣,请从这里开始:https://dlssl.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:
当前版本(截止2014年11月10日)为您提供google-play-services_lib库:
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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_8487000_r29.zip
- https://dl-ssl.google.com/android/repository/google_play_services_9080000_r30.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).
同样的技术可以让您测试无法升级的旧版本谷歌Maps(谷歌Play Services),它是在模拟器的旧版本中硬连接的。我还没有在模拟器上测试所有这些版本,但是已经成功地在模拟器中测试了谷歌映射,以支持基于谷歌API的AVD (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
谷歌偶尔也会尝试更新模拟器。下面是一个问题跟踪线程,讨论客户机库和仿真器之间的版本不兼容性问题,以及谷歌试图修复它们的各种尝试:https://code.google.com/p/android/issues/detail?id=57880
[UPDATE:]
(更新:)
@btrue see answer below now has a much better answer than my answer
@btrue请看下面的回答现在有一个比我更好的答案
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.
您将在其中找到包含AAR格式的旧版本的目录——只需将其重命名为.zip以进行提取。
#2
14
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.
公认的答案太麻烦了。谷歌实际上在SDK管理器中分发旧版本。在“附加”项下,有“谷歌存储库”。在存储库中,GPS libs返回到3.1.36版本。它们是AAR格式,这只是构建项目的一个压缩包。将名称改为*。zip,解压它,里面是一个类。jar,是所有gps类的jar。如果不需要任何资源,可以将jar文件添加到类路径中。完成了。
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
#3
1
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
您可以在SDK管理器中为froyo下载谷歌游戏服务,它与SDK 8一起工作,但是要得到一个特定的版本是不可能的。当前的谷歌播放服务可以使用10或以上版本
#4
1
One of requirements is to put in project google-play-services_lib with version lower/equal to emulator level.
其中一个要求是将google-play-services_lib项目放在较低/等于仿真器级别的版本中。
google-play-services_lib
has nothing to do with emulator versions.
google-play-services_lib与模拟器版本没有任何关系。
The question is, how to download older version of google-play-services_lib than those downloaded by android sdk manager?
问题是,如何下载比android sdk管理器下载的更老版本的google-play-services_lib ?
AFAIK, there is no way to do this. Furthermore, as has been pointed out, this is not necessary.
阿法伊克,这是不可能的。此外,正如所指出的,这是不必要的。
Then If your device were broken or anything you would have no ability to test your program
如果你的设备坏了或者有什么问题,你就不能测试你的程序了
That makes no sense whatsoever. google-play-services_lib
is a library. It is not Google Play Services itself, but a client library for utilizing Google Play Services.
这毫无意义。google-play-services_lib是一个图书馆。它不是谷歌播放服务本身,而是用于使用谷歌播放服务的客户端库。
But then I need to use support library what I would like to avoid
但是我需要使用支持库来避免
As has been noted, the Android Support package is not tied to the Play Services SDK. Parts of the Play Services SDK can use the Android Support package (e.g., SupportMapFragment
), but the Play Services SDK does not require the Android Support package.
如前所述,Android支持包不与Play Services SDK绑定。Play服务SDK的一部分可以使用Android支持包(例如,SupportMapFragment),但是Play服务SDK并不需要Android支持包。