最新消息:

Android SDK 离线下载与安装分析(附上提取下载地址的python脚本)

android 大步 1430浏览 0评论
我在这篇《Android SDK 离线下载与安装分析| 青劲草》的基础上做了部分修改和说明。并附带上了自己的提取下载链接脚本,脚本写了有三四个月了,很简单。

 

包含其他xml的url信息
http://dl.google.com/android/repository/addons_list-2.xmlhttp://dl.google.com/android/repository/extras/intel/addon.xml

谷歌眼镜:
http://dl-ssl.google.com/glass/gdk/addon.xml

http://dl.google.com/android/repository/addon-6.xml
http://dl.google.com/android/repository/addon.xml

http://dl.google.com/android/repository/repository-11.xml
镜像
http://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml
http://dl.google.com/android/repository/sys-img/x86/addon-x86.xml
http://dl.google.com/android/repository/sys-img/android/sys-img.xml
http://dl.google.com/android/repository/sys-img/android-tv/sys-img.xml
http://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml

android sdk tools   在文件http://dl.google.com/android/repository/repository-11.xml   中
,名字类似tools_r24.4.1-windows.zip。

Extras分类下的更新,在文件http://dl.google.com/android/repository/addon.xml    中。

image镜像文件:

http://dl.google.com/android/repository/sys-img/android/sys-img.xml


 

先用android版本搜索,在用reversion来搜

 

 

 

对于 Android 开发的朋友来说,首先要做的就是配置开发环境,目前官方提供的 IDE 是
AndroidStudio,不过个人还是习惯于 Eclipse。由于国内的网络环境原因,通过官方的 SDK Manager
的下载速度一般很慢,因此采用离线下载比较简单。简单来说就是先把安装需要的压缩包通过迅雷等 P2P
软件下载到本地,然后再配置改动一些参数来本地安装。但是一般方法费时费力,主要是因为网上贴出来的下载网盘链接或者官方下载地址总在不断更新,不具有时
效性。这篇文章对 Android SDK 的下载和配置进行了分析,提供了有效获取离线 SDK 的方式。

原理概述


文主要对 SDK Manager 如何解析 xml 进行分析,得到对应的文件下载地址,以及下载到本地后如何配置参数来完成 Android SDK
的安装。这种方法既不提供实时的下载地址和分享链接,又不会因为 SDK 地址更新失效,关键是分析弄清楚 SDK Manager
的工作原理。Android SDK 主要通过 Android SDK Manager 来管理,而这个 Manager 管理资源主要包括

Tools

这部分主要有下列三个工具:

  • Android SDK Tools
  • Android SDK Platform-tools
  • Android SDK Build-tools (编译工具)

Platform

这部分就包括对应不同 Android 版本的平台库,示例文件和 google 官方的 API 接口文件,以及对应版本的源码:

  • SDK Platform
  • Samples for SDK
  • Google APIs
  • Sources for Android SDK (始于 API 14,也即是 Android 4.0 之后的版本才有源码可以通过 Manager 下载管理)
  • android system image(android系统镜像文件,体积较大,平时下载耗时最多的东西)
android system image有分为下面几种类型:
1.按CPU架构分为:
x86 system image: 又分为32位和64位
  • Intel x86 Atom_64 System Image
  • Intel x86 Atom System Image
ARM  system image:
  • Arm EABI V7a System Image
还有就是带google apis的system image:
2016-01-07_221159.png
以及android TV 和Android Wear System Image:(如果只是做手机开发,可以忽略这两个)
2016-01-07_srfwewerw221342.png

Extras

以下的额外文件有些是必须的开发库,比如 Support Library 等,其他的主要是集成 google 的一些资源,比如应用商店 google play 等,各个文件的作用就不作介绍了,一般都能搜到相关资料。

  • GPU Debugging tools
  • Android Support Repository
  • Android Support Library
  • Google AdMob Ads SDK
  • Google Analytics App Tracking SDK
  • Android Auto Desktop Head Unit emulator
  • Google Cloud Messaging for Android Library
  • Google Play services for Froyo
  • Google Play services
  • Google Repository
  • Google Play APK Expansion Library
  • Google Play Billing Library
  • Google Play Licensing Library
  • Android Auto API Simulators
  • Google USB Driver
  • Google Web Driver
  • Intel x86 Emulator Accelerator(HAXM installer)  注意,这个只是下载了安装包,需要自己点击安装才行

具体操作


先得先在 Eclipse 中把插件 ADT 装好,不过在 2013 年时候 Android 官网已经提供集成 ADT 的 Eclipse 下载,
最新官方版本已经更改为 Android Studio 了,但是都使用 Android SDK Manager 来管理。因此第一步安装 ADT
工作基本可以略过了(如果确实不会装,请自行查资料解决,不在本文讨论范围内),后续操作都是在已经安装好 SDK Manager 的前提下进行的。

Load XML 文件

打开 Manager 就可以看到底下状态栏显示 Parsing XML 和 Fetching 一些 XML 文件了,通过 manager Log 也可以看到爬取记录,如下图:


析到的的 XML 文件就是
repository-10.xml,addons_list-2.xml,addon-6.xml,addon.xml。最重要是
repository-10.xml 和 addon.xml 这两个,前者包含了平台资源文件的下载地址,后者则主要是前面介绍的 Extras
内容地址。所以,只需要打开 log 窗口,然后复制出这两个 XML 文件的地址(比如本文写作时的地址是https://dl-ssl.google.com/android/repository/repository-10.xmlhttps://dl-ssl.google.com/android/repository/addon.xml),将其复制到浏览器打开保存或者直接用下载软件下载就可以了。

解析资源地址


过上一步得到了 repository-10.xml 和 addon.xml,接下来就是对应分析 XML 中的地址了,其实这两个 XML
打开后稍微分析下就可以发现规律了,如下所示可以在 repository-10.xml 文件中搜索每一行后面的 跳到对应位置提取地址。

必须安装的 TOOL 资源:

  • Tools
    Android SDK Tools
  • Platform-tools
    Android SDK Platform-tools
  • Build-tools
    Android SDK Build-tools

对于每一个 API level :

  • Platform
    SDK Platform
  • Samples
    Samples for SDK
  • Sources
    Sources for Android SDK
    在 addon.xml 文件中搜索 跳到对应位置提取 Google APIs 地址。
  • Google APIs

在 addon.xml 文件中搜索以下关键词定位到 Extras 类别的下载地址位置

  • Extras
    Android Support Library
    Android Support Repository
    Google Repository
    Google Play Licensing Library
    Google Play APK Expansion Library
    Google Play services for Froyo
    Google Play services
    Google USB Driver
    Google Play Billing Library
    Google AdMob Ads SDK
    Google Analytics App Tracking SDK
    Google Web Driver
    Google Cloud Messaging for Android Library
    Android Auto API Simulators

提取Android SDK 下载地址脚本

下载地址见:https://github.com/ksharpdabu/downAndroidSDK/blob/master/gg.py

 

使用方法:

电脑上安装了python 3.x环境:

#python  gg.py > downlink.txt

 

执行成功后,就会得到所有sdk 资源的下载地址。

当然,如果你那没法解析 dl.google.com 这个域名,则可以使用我已经上传的downlink.txt :见:

https://github.com/ksharpdabu/downAndroidSDK/blob/master/downlink.txt

 

下载完这些资源包之后,如何放到对应的文件夹下,就请仔细参照这篇文章。

 

安装配置

通过迅雷等软件直接下载到本地后都是压缩包,如图:

下一步就是找到 SDK Manager 的目录,打开 sdk 文件夹后,主要含有如下文件夹:

  • add-ons
  • build-tools
  • extras
  • platforms
  • platform-tools
  • samples
  • sources
  • temp
  • tools

add-ons


于 add-ons 文件夹,需要将 google_apis-10_r02.zip(其他 API Level 类似)解压进去,并重命名为
addon-google_apis-google-10,然后进入目录,新建 source.properties 文件,写入如下内容:

configuration
1
2
3
4
5
6
7
8
9
10
11
12
13
### Android Tool: Source of this archive.
#Sun Sep 14 14:03:53 CST 2014
Addon.NameDisplay=Google APIs
Addon.NameId=google_apis
Addon.VendorDisplay=Google Inc.
Addon.VendorId=google
AndroidVersion.ApiLevel=10
Pkg.Desc=Android + Google APIs, API 10, revision 2
Pkg.DescUrl=http\://developer.android.com/
Pkg.License=To get started with the Android SDK, you must agree to the following terms and conditions.\n\nThis is the Android SDK License Agreement (the "License Agreement").\n\n1. Introduction\n\n1.1 The Android SDK (referred to in the License Agreement as the "SDK" and specifically including the Android system files, packaged APIs, and SDK library files and tools , if and when they are made available) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the SDK.\n\n1.2 "Android" means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL\: http\://source.android.com/, as updated from time to time.\n\n1.3 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.\n\n2. Accepting the License Agreement\n\n2.1 In order to use the SDK, you must first agree to the License Agreement. You may not use the SDK if you do not accept the License Agreement.\n\n2.2 By clicking to accept and/or using the SDK, you hereby agree to the terms of the License Agreement.\n\n2.3 You may not use the SDK and may not accept the License Agreement if you are a person barred from receiving the SDK under the laws of the United States or other countries including the country in which you are resident or from which you use the SDK.\n\n2.4 If you will use the SDK internally within your company or organization you agree to be bound by the License Agreement on behalf of your employer or other entity, and you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the SDK on behalf of your employer or other entity.\n\n3. SDK License from Google\n\n3.1 Subject to the terms of the License Agreement, Google grants you a royalty-free, non-assignable, non-exclusive, non-sublicensable, limited, revocable license to use the SDK, personally or internally within your company or organization, solely to develop and distribute applications to run on the Android platform.\n\n3.2 You agree that Google or third parties own all legal right, title and interest in and to the SDK, including any Intellectual Property Rights that subsist in the SDK. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.\n\n3.3 You may not use the SDK for any purpose not expressly permitted by the License Agreement. Except to the extent required by applicable third party licenses, you may not\: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK; or (b) load any part of the SDK onto a mobile handset or any other hardware device except a personal computer, combine any part of the SDK with other software, or distribute any software or device incorporating a part of the SDK.\n\n3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the SDK.\n\n3.5 Use, reproduction and distribution of components of the SDK licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement. You agree to remain a licensee in good standing in regard to such open source software licenses under all the rights granted and to refrain from any actions that may terminate, suspend, or breach such rights.\n\n3.6 You agree that the form and nature of the SDK that Google provides may change without prior notice to you and that future versions of the SDK may be incompatible with applications developed on previous versions of the SDK. You agree that Google may stop (permanently or temporarily) providing the SDK (or any features within the SDK) to you or to users generally at Google's sole discretion, without prior notice to you.\n\n3.7 Nothing in the License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.\n\n3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the SDK.\n\n4. Use of the SDK by You\n\n4.1 Google agrees that nothing in the License Agreement gives Google any right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the SDK, including any intellectual property rights that subsist in those applications.\n\n4.2 You agree to use the SDK and write applications only for purposes that are permitted by (a) the License Agreement, and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).\n\n4.3 You agree that if you use the SDK to develop applications, you will protect the privacy and legal rights of users. If users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If users provide you with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, each user has given you permission to do so.\n\n4.4 You agree that you will not engage in any activity with the SDK, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of Google or any third party.\n\n4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.\n\n4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.\n\n5. Your Developer Credentials\n\n5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.\n\n6. Privacy and Information\n\n6.1 In order to continually innovate and improve the SDK, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the SDK are being used and how they are being used. Before any of this information is collected, the SDK will notify you and seek your consent. If you withhold consent, the information will not be collected.\n\n6.2 The data collected is examined in the aggregate to improve the SDK and is maintained in accordance with Google's Privacy Policy located at http\://www.google.com/policies/privacy/.\n\n7. Third Party Applications\n\n7.1 If you use the SDK to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.\n\n7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.\n\n7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party.\n\n8. Using Google APIs\n\n8.1 Google APIs\n\n8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.\n\n8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.\n\n9. Terminating the License Agreement\n\n9.1 The License Agreement will continue to apply until terminated by either you or Google as set out below.\n\n9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the SDK and any relevant developer credentials.\n\n9.3 Google may at any time, terminate the License Agreement, with or without cause, upon notice to you.\n\n9.4 The License Agreement will automatically terminate without notice or other action when Google ceases to provide the SDK or certain parts of the SDK to users in the country in which you are resident or from which you use the service.\n\n9.5 When the License Agreement is terminated, the license granted to you in the License Agreement will terminate, you will immediately cease all use of the SDK, and the provisions of paragraphs 10, 11, 12 and 14 shall survive indefinitely.\n\n10. DISCLAIMERS\n\n10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.\n\n10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. WITHOUT LIMITING THE FOREGOING, YOU UNDERSTAND THAT THE SDK MAY CONTAIN ERRORS, DEFECTS AND SECURITY VULNERABILITIES THAT CAN RESULT IN SIGNIFICANT DAMAGE, INCLUDING THE COMPLETE, IRRECOVERABLE LOSS OF USE OF YOUR COMPUTER SYSTEM OR OTHER DEVICE.\n\n10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\n\n11. LIMITATION OF LIABILITY\n\n11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.\n\n12. Indemnification\n\n12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys\u2019 fees) arising out of or accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes any Intellectual Property Rights of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you of the License Agreement.\n\n13. Changes to the License Agreement\n\n13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the SDK is made available.\n\n14. General Legal Terms\n\n14.1 The License Agreement constitutes the whole legal agreement between you and Google and governs your use of the SDK (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the SDK.\n\n14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.\n\n14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the License Agreement will continue to be valid and enforceable.\n\n14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the License Agreement.\n\n14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.\n\n14.6 The License Agreement may not be assigned or transferred by you without the prior written approval of Google, and any attempted assignment without such approval will be void. You shall not delegate your responsibilities or obligations under the License Agreement without the prior written approval of Google.\n\n14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.\n\nJune 2014.\n
Pkg.LicenseRef=android-sdk-license
Pkg.Revision=2
Pkg.SourceUrl=https\://dl-ssl.google.com/android/repository/addon.xml

其他 API 版本,则需要改动上述代码中的对应数字和 Revision 号,即

1
2
3
AndroidVersion.ApiLevel=10
Pkg.Desc=Android + Google APIs, API 10, revision 2
Pkg.Revision=2


三行中数字,比如将 10 改为 14、15、17、19,revision 后的 2 改为对应的 1、2 者 3
等,具体信息解压缩后的文件夹名称可以体现出来,google_apis-10_r02 则说明 API Level 为 10,Revision 号为
2。

build-tools

解压后重命名为版本号即可,如压缩包名称为 build-tools_r21.1.2-windows.zip,解压后重命名文件夹为 21.1.2 放进 build-tools 文件夹即可。

extras

extras 文件夹下主要为 android 和 google 这两个文件夹,将前面 Extras 列表下的 Google 开头文件对应压缩包解压后放在 google 文件夹里,Android 开头的压缩包则解压缩后放进 android 文件夹。

platforms

直接将对应的 android SDK 版本解压后放进去即可,比如 android-17_r03.zip 解压后为 android-4.2.2 文件夹。

platform-tools

直接解压放进去即可

samples

比如解压 samples-16_r01.zip 得到 android-4.1 文件夹,重命名为 android-16 后放进 samples 文件夹。

sources

同上 samples 方法,解压后得到 src 文件夹,重命名为对应名称如 android-16 放进 sources 文件夹。

temp

通过 SDK Manager 下载的压缩包一般临时放在此文件夹下,安装完成后压缩包会被删除。

tools

直接解压放进去即可。

补充(15.3.22)

墙内无缝更新 Android SDK,请戳

备份文字 1

1. 打开 Android SDK Manager, 打开设置
2. 设置代理
可选取下面之一

备份文字 2

1.Android SDK 在线更新镜像服务器
其他镜像服务器地址同上补充:
中国科学院开源协会镜像站地址:
IPV4/IPV6: http://mirrors.opencas.cn 端口:80
IPV4/IPV6: http://mirrors.opencas.org 端口:80
IPV4/IPV6: http://mirrors.opencas.ac.cn 端口:80
2. 使用方法:
2.1 启动 Android SDK Manager ,打开主界面,依次选择『Tools』、『Options…』,弹出『Android SDK Manager - Settings』窗口;
2.2 在『Android SDK Manager - Settings』窗口中,在『HTTP Proxy Server」和「HTTP Proxy Port』输入框内填入上面镜像服务器地址 (不包含http://,如下图) 和端口,并且选中『Force https://… sources to be fetched using http://…』复选框。设置完成后单击『Close』按钮关闭『Android SDK Manager - Settings』窗口返回到主界面;
2.3 依次选择『Packages』、『Reload』。

补充:https://github.com/inferjay/AndroidDevTools/

后记

结果如下图所示:

亲测 Eclipse 环境可行,按理 AndroidStudio 也行得通(未测试)。

目前就写到这里了,大家如果有改进的建议,欢迎留言~~

 

 

 

 

本人补充:

使用脚本来提取下载地址,然后手动安装。这种方式只适合更新部分文件,因为如果全都都用这种方法,量还是蛮大的,当然,你也可以写个脚本,实现自动解压安装之类的功能。

 

还有,其实最快的方法应该是修改hosts,至于如何找到google的可以使用的ip,嘿嘿,就看你们自己的了。暴力搜索。

 

在中国做开发真是累,唉。

 

 

 

 

 

 

 

 

来自为知笔记(Wiz)

转载请注明:大步's Blog » Android SDK 离线下载与安装分析(附上提取下载地址的python脚本)

SiteMap