如何下载较旧的 google play 服务? [英] How to download older google play services?

查看:81
本文介绍了如何下载较旧的 google play 服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算将 android google maps v2android emulator/android studio 0.4.0 一起使用.要求之一是放入版本低于/等于 emulator 级别的项目 google-play-services_lib.我的模拟器使用 api lv 17.问题是,如何下载比 android sdk manager 下载的旧版本的 google-play-services_lib?

解决方案

我意识到这是一个老问题,但我今天遇到了同样的问题(对于真实设备而不是模拟器)并找到了解决方案.

我知道您可以添加代码来提示用户升级到最新版本(请参阅@nathan-walters 的评论)但是,出于复杂的原因,在我的情况下,我需要使用用户已有的任何版本安装在他们的设备上(如果有),因此更喜欢使用旧版本的客户端库 (google-play-services_lib) 进行编译/构建

为了进一步研究,我解压了 Android SDK 管理器用来查找和安装额外"包(包括最新版本的 Google Play 服务)的 xml.
如果您有兴趣从这里开始:https://dl-ssl.google.com/android/repository/addon.xml

对于为您提供 google-play-services_lib 库的当前版本(截至 2014 年 11 月 10 日):

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

旧版本在 google 服务器上的相同位置(尽管它们可能随时消失),因此如果您准备将当前安装的库移到一边并手动解压旧 zip,那么您可以安装旧版本.我发现了以下内容:

同样的技术将允许您针对在旧版模拟器中硬连线的不可升级的旧版 Google 地图(Google Play 服务)进行测试.我尚未针对模拟器测试所有这些版本,但已成功在模拟器中针对基于 Google API (API 19) 的 AVD 测试了 Google 地图.

Google 偶尔会尝试更新模拟器.这是一个问题跟踪线程,讨论了客户端库和模拟器之间的版本不兼容问题以及谷歌修复它们的各种尝试:https://code.google.com/p/android/issues/detail?id=57880

[更新:]

@btrue 参见下面的答案现在有一个比我的答案更好的答案>

前往:

<你的 android sdk 路径>/extras/google/m2repository/com/google/android/gms/play-services/

您可以在其中找到包含 AAR 格式旧版本的目录 - 只需将其重命名为 .zip 即可提取.

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?

解决方案

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:

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.

这篇关于如何下载较旧的 google play 服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆