不知道有没有人和我一样有绿色强迫症 和 新版本强迫症

一般有新版本我都想更新,又想绿色。现在android 的 官网 不提供 adt的绿色 和 sdk 的绿色版本

以现在的新版为例。

http://dl-ssl.google.com/android/repository/ android 开发相关的东西都在这个目录下面。但官方不提代这个目录的浏览权限

首先下载 eclipse 插件 http://dl.google.com/android/ADT-21.0.0.zip 注意约色部分。不同的adt改版本号就可以了。不知道最新版本去官方

再下 android sdk form windowhttp://dl.google.com/android/android-sdk_r21-windows.zip 同样注意红色版本号 ,解压即可。

再次platform-tool http://dl-ssl.google.com/android/repository/platform-tools_r16-windows.zip android-sdk-r21-windowns对应的platform-tool 最新版本 platform-tool_r16 如果不知道对应的最新版怎么办。解决办法:去eclipse里边 或者 去 android-sdk-r21 目录下面打开android sdk manager tool 下面能看到对应的 platform-tool 版本

下载完后解压到 android-sdk-window 目录

android 4.0 或者 android2.2 sdk http://dl-ssl.google.com/android/repository/android-2.2_r02-windows.zip

解压到 android-sdk-window/platform 目录下面

其它的我觉得在线安装就好了。因为一般下一次就可以了。也不会弄到eclipse 目录里边去

driver:https://dl-ssl.google.com/android/repository/usb_driver_r04-windows.zip

api:http://dl-ssl.google.com/android/repository/google_apis-8_r02.zip

参考:http://my.oschina.net/heguangdong/blog/17443

http://my.oschina.net/unclegeek/blog/94364

5. 原理

查看SDK Manager Log发现每次更新时,SDK Manager 都下载以下5个xml文件:

1 "http://dl-ssl.google.com/android/repository/repository-7.xml";
2 "http://dl-ssl.google.com/android/repository/addon.xml";
3 "http://software.intel.com/sites/landingpage/android/addon.xml";
4 "http://www.mips.com/global/sdk-sys-img.xml";
5 "http://download-software.intel.com/sites/landingpage/android/sys-img.xml";

编写一个简单程序,将其中的名为url的标签对应的内容,拼接在路径http://dl-ssl.google.com/android/repository/后面,即可得到所有需要的安装包的下载地址,然后可以用迅雷等下载工具进行下载,将下载好的包拷贝到SDK根目录下的temp文件夹内,再点安装时,即可直接安装,节省大量时间。(在天朝安装这些包,之有几KB的下载速度)

以下附上代码:

01 packageurlfinder;
02
03 importjava.io.BufferedWriter;
04 importjava.io.File;
05 importjava.io.FileNotFoundException;
06 importjava.io.FileWriter;
07 importjava.io.IOException;
08 importjava.net.MalformedURLException;
09 importjava.net.URL;
10 importjava.util.Iterator;
11 importjava.util.List;
12
13 importorg.dom4j.Document;
14 importorg.dom4j.DocumentException;
15 importorg.dom4j.Element;
16 importorg.dom4j.io.SAXReader;
17
18/**
19 * This program allow you to catch the URL of the installation packages
20 * download by Android SDK Manager. Run this program and get packages'URLs
21 * in the urlfile.txt, copy them to Download Tools to download them faster.
22 * (The speed is extremely slow in China.)
23 * Copy the downloaded packages to {your installation path of Android SDK}/temp
24 * and install them fast in SDK Manager. Enjoy.
25 *
26 * @author ZQY
27 *
28 */
29 publicclassUrlFinder {
30 /* the XML files the SDK Manager read... */
31 public static final String repository = "http://dl-ssl.google.com/android/repository/repository-7.xml";
32 public static final String addon = "http://dl-ssl.google.com/android/repository/addon.xml";
33 public static final String addon2 = "http://software.intel.com/sites/landingpage/android/addon.xml";
34 public static final String sysimg = "http://www.mips.com/global/sdk-sys-img.xml";
35 public static final String sysimg2 = "http://download-software.intel.com/sites/landingpage/android/sys-img.xml";
36 public static final String[] repos = { repository, addon, addon2, sysimg,
37 sysimg2 };
38
39 public static void main(String[] args) throws MalformedURLException,
40 DocumentException {
41 BufferedWriter out = null;
42 try {
43 File file = new File("urlfile.txt");
44 out = new BufferedWriter(new FileWriter(file));
45 for (String repo : repos) {
46 Document doc = read(repo);
47 findurl(doc.getRootElement(), out);
48 }
49 out.close();
50 } catch (FileNotFoundException e) {
51 System.err.println("URL does not exits.");
52 } catch (IOException e) {
53 System.err.println("error write output file.");
54 }
55
56 }
57
58 /* find the <sdk:url/> tag, and get the absolute path of the file */
59 publicstaticvoidfindurl(Element element, BufferedWriter out)
60 throwsIOException {
61 List<?> list = element.elements();
62 for(Iterator<?> its = list.iterator(); its.hasNext();) {
63 Element e = (Element) its.next();
64 if(e.getName().equals("url")) {
65 System.out.println("Found:"+ e.getText());
66 out.write("http://dl-ssl.google.com/android/repository/"
67 + e.getText() +"\n");
68 }
69 findurl(e, out);
70 }
71 }
72
73 publicstaticDocument read(String fileName)throwsMalformedURLException,
74 DocumentException {
75 SAXReader reader =newSAXReader();
76 Document document = reader.read(newURL(fileName));
77 returndocument;
78 }
79}
抓取到的下载路径:

01http://dl-ssl.google.com/android/repository/android-1.1_r1-windows.zip
02http://dl-ssl.google.com/android/repository/android-1.1_r1-macosx.zip
03http://dl-ssl.google.com/android/repository/android-1.1_r1-linux.zip
04http://dl-ssl.google.com/android/repository/android-1.5_r04-windows.zip
05http://dl-ssl.google.com/android/repository/android-1.5_r04-macosx.zip
06http://dl-ssl.google.com/android/repository/android-1.5_r04-linux.zip
07http://dl-ssl.google.com/android/repository/android-1.6_r03-linux.zip
08http://dl-ssl.google.com/android/repository/android-1.6_r03-macosx.zip
09http://dl-ssl.google.com/android/repository/android-1.6_r03-windows.zip
10http://dl-ssl.google.com/android/repository/android-2.0_r01-linux.zip
11http://dl-ssl.google.com/android/repository/android-2.0_r01-macosx.zip
12http://dl-ssl.google.com/android/repository/android-2.0_r01-windows.zip
13http://dl-ssl.google.com/android/repository/android-2.0.1_r01-linux.zip
14http://dl-ssl.google.com/android/repository/android-2.0.1_r01-macosx.zip
15http://dl-ssl.google.com/android/repository/android-2.0.1_r01-windows.zip
16http://dl-ssl.google.com/android/repository/android-2.1_r03-linux.zip
17http://dl-ssl.google.com/android/repository/android-2.2_r03-linux.zip
18http://dl-ssl.google.com/android/repository/android-2.3.1_r02-linux.zip
19http://dl-ssl.google.com/android/repository/android-2.3.3_r02-linux.zip
20http://dl-ssl.google.com/android/repository/android-3.0_r02-linux.zip
21http://dl-ssl.google.com/android/repository/android-3.1_r03-linux.zip
22http://dl-ssl.google.com/android/repository/android-3.2_r01-linux.zip
23http://dl-ssl.google.com/android/repository/android-14_r03.zip
24http://dl-ssl.google.com/android/repository/android-15_r03.zip
25http://dl-ssl.google.com/android/repository/android-16_r03.zip
26http://dl-ssl.google.com/android/repository/android-17_r01.zip
27http://dl-ssl.google.com/android/repository/sysimg_armv7a-14_r02.zip
28http://dl-ssl.google.com/android/repository/sysimg_armv7a-15_r02.zip
29http://dl-ssl.google.com/android/repository/sysimg_armv7a-16_r03.zip
30http://dl-ssl.google.com/android/repository/sysimg_armv7a-17_r01.zip
31http://dl-ssl.google.com/android/repository/samples-2.1_r01-linux.zip
32http://dl-ssl.google.com/android/repository/samples-2.2_r01-linux.zip
33http://dl-ssl.google.com/android/repository/samples-2.3_r01-linux.zip
34http://dl-ssl.google.com/android/repository/samples-2.3.3_r01-linux.zip
35http://dl-ssl.google.com/android/repository/samples-3.0_r01-linux.zip
36http://dl-ssl.google.com/android/repository/samples-3.1_r01-linux.zip
37http://dl-ssl.google.com/android/repository/samples-3.2_r01-linux.zip
38http://dl-ssl.google.com/android/repository/samples-14_r02.zip
39http://dl-ssl.google.com/android/repository/samples-15_r02.zip
40http://dl-ssl.google.com/android/repository/samples-16_r01.zip
41http://dl-ssl.google.com/android/repository/samples-17_r01.zip
42http://dl-ssl.google.com/android/repository/platform-tools_r16-windows.zip
43http://dl-ssl.google.com/android/repository/platform-tools_r16-linux.zip
44http://dl-ssl.google.com/android/repository/platform-tools_r16-macosx.zip
45http://dl-ssl.google.com/android/repository/tools_r21-windows.zip
46http://dl-ssl.google.com/android/repository/tools_r21-linux.zip
47http://dl-ssl.google.com/android/repository/tools_r21-macosx.zip
48http://dl-ssl.google.com/android/repository/tools_r21.0.1_rc1-windows.zip
49http://dl-ssl.google.com/android/repository/tools_r21.0.1_rc1-linux.zip
50http://dl-ssl.google.com/android/repository/tools_r21.0.1_rc1-macosx.zip
51http://dl-ssl.google.com/android/repository/docs-17_r01.zip
52http://dl-ssl.google.com/android/repository/sources-14_r01.zip
53http://dl-ssl.google.com/android/repository/sources-15_r02.zip
54http://dl-ssl.google.com/android/repository/sources-16_r02.zip
55http://dl-ssl.google.com/android/repository/sources-17_r01.zip
56http://dl-ssl.google.com/android/repository/google_apis-3-r03.zip
57http://dl-ssl.google.com/android/repository/google_apis-4_r02.zip
58http://dl-ssl.google.com/android/repository/google_apis-5_r01.zip
59http://dl-ssl.google.com/android/repository/google_apis-6_r01.zip
60http://dl-ssl.google.com/android/repository/google_apis-7_r01.zip
61http://dl-ssl.google.com/android/repository/google_apis-8_r02.zip
62http://dl-ssl.google.com/android/repository/google_apis-9_r02.zip
63http://dl-ssl.google.com/android/repository/google_apis-10_r02.zip
64http://dl-ssl.google.com/android/repository/google_apis-11_r01.zip
65http://dl-ssl.google.com/android/repository/google_apis-12_r01.zip
66http://dl-ssl.google.com/android/repository/google_apis-13_r01.zip
67http://dl-ssl.google.com/android/repository/google_apis-14_r02.zip
68http://dl-ssl.google.com/android/repository/google_apis-15_r02.zip
69http://dl-ssl.google.com/android/repository/google_apis-16_r03.zip
70http://dl-ssl.google.com/android/repository/google_tv-12_r02.zip
71http://dl-ssl.google.com/android/repository/google_apis-17_r01.zip
72http://dl-ssl.google.com/android/repository/support_r11.zip
73http://dl-ssl.google.com/android/repository/market_licensing-r02.zip
74http://dl-ssl.google.com/android/repository/market_apk_expansion-r02.zip
75http://dl-ssl.google.com/android/repository/google_play_services_2010110_r03.zip
76http://dl-ssl.google.com/android/repository/usb_driver_r07-windows.zip
77http://dl-ssl.google.com/android/repository/market_billing_r02.zip
78https://dl-ssl.google.com/googleadmobadssdk/googleadmobadssdkandroid-6.2.1.zip
79https://dl.google.com/gaformobileapps/GoogleAnalyticsAndroid_1.4.2.zip
80http://dl-ssl.google.com/android/repository/webdriver_r02.zip
81http://dl-ssl.google.com/android/repository/gcm_r03.zip
82http://dl-ssl.google.com/android/repository/addon_intel_sysimg_2.3.7_api-10.zip
83http://dl-ssl.google.com/android/repository/http://download-software.intel.com/sites/landingpage/android/extra_intel_haxm-windows_r02.zip
84http://dl-ssl.google.com/android/repository/http://download-software.intel.com/sites/landingpage/android/extra_intel_haxm-macosx_r02.zip
85http://dl-ssl.google.com/android/repository/http://d2a85uzpvoidrc.cloudfront.net/sysimg_mips-15_r01.zip
86http://dl-ssl.google.com/android/repository/http://d2a85uzpvoidrc.cloudfront.net/sysimg_mips-16_r02.zip
87http://download-software.intel.com/sites/landingpage/android/sysimg_x86-15_r01.zip
88http://download-software.intel.com/sites/landingpage/android/sysimg_x86-16_r01.zip

更多相关文章

  1. 直播源码Android实现 曲线路径动画
  2. android中获取当前程序路径
  3. Android版本号对应API、版本名称、NDK版本等
  4. android文件缓存,并SD卡创建目录未能解决和bitmap内存溢出解决
  5. Android 获取SD卡路径和判断SD卡是否存在
  6. Android基础分析目录
  7. Android SDK中 tools 目录下的工具介绍
  8. 第二讲:Android系统构架分析和应用程序目录结构分析
  9. Android studio生成APK打包,修改生成APK的路径和名字

随机推荐

  1. 代码混淆—android被反编译的两种解决方
  2. Android零基础教程8天学会移动开发
  3. H5 通过 input 标签,调起 Android 手机相
  4. Android的开机启动流程概述
  5. Android中输出HTML格式下的文字
  6. android之自定义控件一控件的呈现机制
  7. 用百度API高仿微信定位demo
  8. [置顶] Android(安卓)listview checkbox
  9. (android/swig实现)用c/c++混合编程方式
  10. Android 模拟HTTP 协议进行表单提交