Linux 如何下载较旧的 google play 服务?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20982533/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to download older google play services?
提问by Jacob
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
?
我将使用 androidgoogle maps v2
与android emulator/android studio 0.4.0
. 要求之一是放入google-play-services_lib
版本低于/等于emulator
级别的项目。我的模拟器与api lv 17
. 问题是,如何下载google-play-services_lib
比下载的旧版本android sdk manager
?
采纳答案by Mike
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 Manager 用来查找和安装“额外”包(包括最新版本的 Google Play 服务)的 xml。
如果您有兴趣从这里开始: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:
对于为您提供 google-play-services_lib 库的当前版本(截至 2014 年 11 月 10 日):
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:
旧版本在 google 服务器上的相同位置(尽管它们随时可能消失),因此如果您准备将当前安装的库移到一边并手动解压缩旧 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_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
- 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 地图(Google Play 服务)进行测试。我尚未针对模拟器测试所有这些版本,但已成功在模拟器中针对基于 Google API (API 19) 的 AVD 测试了 Google Maps。
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
Google 确实偶尔会尝试更新模拟器。这是一个问题跟踪线程,讨论客户端库和模拟器之间的版本不兼容问题以及谷歌修复它们的各种尝试:https: //code.google.com/p/android/issues/detail?id=57880
[UPDATE:]
[更新:]
@btrue see answer belownow has a muchbetter 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 即可提取。
回答by tyczj
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
你可以下载google play services for froyo
在SDK Manager
与SDK 8个,最多,但工程得到特定的版本是不可能AFAIK。当前的 google play 服务适用于 10 及更高版本
回答by CommonsWare
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 manager 下载的旧版本的 google-play-services_lib?
AFAIK, there is no way to do this. Furthermore, as has been pointed out, this is not necessary.
AFAIK,没有办法做到这一点。此外,正如已经指出的,这不是必需的。
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
是图书馆。它不是 Google Play 服务本身,而是用于使用 Google Play 服务的客户端库。
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 usethe Android Support package (e.g., SupportMapFragment
), but the Play Services SDK does not requirethe Android Support package.
如前所述,Android 支持包与 Play Services SDK 无关。部分播放服务 SDK 可以使用Android 支持包(例如,SupportMapFragment
),但播放服务 SDK不需要Android 支持包。
回答by BTRUE
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.
接受的答案太麻烦了。Google 实际上确实在 SDK 管理器中分发旧版本。
在“Extras”下,有“Google Repository”。
在存储库中是 GPS 库回到版本 3.1.36。
它们是 AAR 格式,这只是构建项目的一个 zip。
改名为*.zip,解压,里面是classes.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