Android SDK 离线下载与安装分析

android-sdk-banner1.jpg

对于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 下载管理)

Extras

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

  • 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

具体操作

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

Load XML文件

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

managerLog.png

解析到的的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

提取SDK下载地址

推荐下载API Level为10、14、15、16、17、19的SDK,截至本文写作时的地址为:

https://dl-ssl.google.com/android/repository/tools_r24.0.2-windows.zip
https://dl-ssl.google.com/android/repository/platform-tools_r21-windows.zip
https://dl-ssl.google.com/android/repository/build-tools_r21.1.2-windows.zip

https://dl-ssl.google.com/android/repository/android-2.3.3_r02-linux.zip
https://dl-ssl.google.com/android/repository/android-14_r04.zip
https://dl-ssl.google.com/android/repository/android-15_r05.zip
https://dl-ssl.google.com/android/repository/android-16_r05.zip
https://dl-ssl.google.com/android/repository/android-17_r03.zip
https://dl-ssl.google.com/android/repository/android-19_r04.zip

https://dl-ssl.google.com/android/repository/samples-2.3.3_r01-linux.zip
https://dl-ssl.google.com/android/repository/samples-14_r02.zip
https://dl-ssl.google.com/android/repository/samples-15_r02.zip
https://dl-ssl.google.com/android/repository/samples-16_r01.zip
https://dl-ssl.google.com/android/repository/samples-17_r01.zip
https://dl-ssl.google.com/android/repository/samples-19_r06.zip

https://dl-ssl.google.com/android/repository/google_apis-10_r02.zip
https://dl-ssl.google.com/android/repository/google_apis-14_r02.zip
https://dl-ssl.google.com/android/repository/google_apis-15_r02.zip
https://dl-ssl.google.com/android/repository/google_apis-16_r03.zip
https://dl-ssl.google.com/android/repository/google_apis-17_r03.zip
https://dl-ssl.google.com/android/repository/google_apis-19_r10.zip

https://dl-ssl.google.com/android/repository/sources-14_r01.zip
https://dl-ssl.google.com/android/repository/sources-15_r02.zip
https://dl-ssl.google.com/android/repository/sources-16_r02.zip
https://dl-ssl.google.com/android/repository/sources-17_r01.zip
https://dl-ssl.google.com/android/repository/sources-19_r02.zip

https://dl-ssl.google.com/android/repository/support_r21.0.3.zip
https://dl-ssl.google.com/android/repository/android_m2repository_r10.zip
https://dl-ssl.google.com/android/repository/google_m2repository_r15.zip
https://dl-ssl.google.com/android/repository/market_licensing-r02.zip
https://dl-ssl.google.com/android/repository/market_apk_expansion-r03.zip
https://dl-ssl.google.com/android/repository/google_play_services_3265130_r12.zip
https://dl-ssl.google.com/android/repository/google_play_services_6587000_r22.zip
https://dl-ssl.google.com/android/repository/usb_driver_r11-windows.zip
https://dl-ssl.google.com/android/repository/play_billing_r05.zip
https://dl-ssl.google.com/googleadmobadssdk/googleadmobadssdkandroid-6.4.1.zip
https://dl.google.com/gaformobileapps/GoogleAnalyticsAndroid_2.0beta5.zip
https://dl-ssl.google.com/android/repository/webdriver_r02.zip
https://dl-ssl.google.com/android/repository/gcm_r03.zip
https://dl-ssl.google.com/android/repository/simulator_r01.zip

安装配置

通过迅雷等软件直接下载到本地后都是压缩包,如图:
<img src="/images/sdkZip.png" height='50%' width='50%'/>
下一步就是找到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文件,写入如下内容:

### 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号,即

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.设置代理
可选取下面之一
- 大连东软信息学院镜像服务器地址:服务器: http://mirrors.neusoft.edu.cn 端口:80
- 北京化工大学镜像服务器地址:
IPv4: http://ubuntu.buct.edu.cn 端口:80
IPv4: http://ubuntu.buct.cn 端口:80
IPv6: http://ubuntu.buct6.edu.cn 端口:80
- 上海GDG镜像服务器地址:服务器: http://sdk.gdgshanghai.com 端口:8000
3.关闭设置页, 选择Packages->Reload 重新加载, 接下来你就可以无阻碍的更新各种SDK了。

备份文字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』输入框内填入上面镜像服务器地址(不包含<code>http://</code>,如下图)和端口,并且选中『Force <code>https://</code>... sources to be fetched using <code>http://</code>...』复选框。设置完成后单击『Close』按钮关闭『Android SDK Manager - Settings』窗口返回到主界面;
2.3依次选择『Packages』、『Reload』。

后记

结果如下图所示:

sdkManager.png

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

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


最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 202,607评论 5 476
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,047评论 2 379
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 149,496评论 0 335
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,405评论 1 273
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,400评论 5 364
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,479评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,883评论 3 395
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,535评论 0 256
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,743评论 1 295
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,544评论 2 319
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,612评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,309评论 4 318
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,881评论 3 306
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,891评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,136评论 1 259
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 42,783评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,316评论 2 342

推荐阅读更多精彩内容