不知道有没有人和我一样有绿色强迫症 和 新版本强迫症
一般有新版本我都想更新,又想绿色。现在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 window http://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的下载速度)
以下附上代码:
03 |
import java.io.BufferedWriter; |
05 |
import java.io.FileNotFoundException; |
06 |
import java.io.FileWriter; |
07 |
import java.io.IOException; |
08 |
import java.net.MalformedURLException; |
10 |
import java.util.Iterator; |
11 |
import java.util.List; |
13 |
import org.dom4j.Document; |
14 |
import org.dom4j.DocumentException; |
15 |
import org.dom4j.Element; |
16 |
import org.dom4j.io.SAXReader; |
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. |
29 |
public class UrlFinder { |
59 |
public static void findurl(Element element, BufferedWriter out) |
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" ); |
73 |
public static Document read(String fileName) throws MalformedURLException, |
75 |
SAXReader reader = new SAXReader(); |
76 |
Document document = reader.read( new URL(fileName)); |
抓取到的下载路径:
01 |
http://dl-ssl.google.com/android/repository/android-1.1_r1-windows.zip |
02 |
http://dl-ssl.google.com/android/repository/android-1.1_r1-macosx.zip |
03 |
http://dl-ssl.google.com/android/repository/android-1.1_r1-linux.zip |
04 |
http://dl-ssl.google.com/android/repository/android-1.5_r04-windows.zip |
05 |
http://dl-ssl.google.com/android/repository/android-1.5_r04-macosx.zip |
06 |
http://dl-ssl.google.com/android/repository/android-1.5_r04-linux.zip |
07 |
http://dl-ssl.google.com/android/repository/android-1.6_r03-linux.zip |
08 |
http://dl-ssl.google.com/android/repository/android-1.6_r03-macosx.zip |
09 |
http://dl-ssl.google.com/android/repository/android-1.6_r03-windows.zip |
10 |
http://dl-ssl.google.com/android/repository/android-2.0_r01-linux.zip |
11 |
http://dl-ssl.google.com/android/repository/android-2.0_r01-macosx.zip |
12 |
http://dl-ssl.google.com/android/repository/android-2.0_r01-windows.zip |
13 |
http://dl-ssl.google.com/android/repository/android-2.0.1_r01-linux.zip |
14 |
http://dl-ssl.google.com/android/repository/android-2.0.1_r01-macosx.zip |
15 |
http://dl-ssl.google.com/android/repository/android-2.0.1_r01-windows.zip |
16 |
http://dl-ssl.google.com/android/repository/android-2.1_r03-linux.zip |
17 |
http://dl-ssl.google.com/android/repository/android-2.2_r03-linux.zip |
18 |
http://dl-ssl.google.com/android/repository/android-2.3.1_r02-linux.zip |
19 |
http://dl-ssl.google.com/android/repository/android-2.3.3_r02-linux.zip |
20 |
http://dl-ssl.google.com/android/repository/android-3.0_r02-linux.zip |
21 |
http://dl-ssl.google.com/android/repository/android-3.1_r03-linux.zip |
22 |
http://dl-ssl.google.com/android/repository/android-3.2_r01-linux.zip |
23 |
http://dl-ssl.google.com/android/repository/android-14_r03.zip |
24 |
http://dl-ssl.google.com/android/repository/android-15_r03.zip |
25 |
http://dl-ssl.google.com/android/repository/android-16_r03.zip |
26 |
http://dl-ssl.google.com/android/repository/android-17_r01.zip |
27 |
http://dl-ssl.google.com/android/repository/sysimg_armv7a-14_r02.zip |
28 |
http://dl-ssl.google.com/android/repository/sysimg_armv7a-15_r02.zip |
29 |
http://dl-ssl.google.com/android/repository/sysimg_armv7a-16_r03.zip |
30 |
http://dl-ssl.google.com/android/repository/sysimg_armv7a-17_r01.zip |
31 |
http://dl-ssl.google.com/android/repository/samples-2.1_r01-linux.zip |
32 |
http://dl-ssl.google.com/android/repository/samples-2.2_r01-linux.zip |
33 |
http://dl-ssl.google.com/android/repository/samples-2.3_r01-linux.zip |
34 |
http://dl-ssl.google.com/android/repository/samples-2.3.3_r01-linux.zip |
35 |
http://dl-ssl.google.com/android/repository/samples-3.0_r01-linux.zip |
36 |
http://dl-ssl.google.com/android/repository/samples-3.1_r01-linux.zip |
37 |
http://dl-ssl.google.com/android/repository/samples-3.2_r01-linux.zip |
38 |
http://dl-ssl.google.com/android/repository/samples-14_r02.zip |
39 |
http://dl-ssl.google.com/android/repository/samples-15_r02.zip |
40 |
http://dl-ssl.google.com/android/repository/samples-16_r01.zip |
41 |
http://dl-ssl.google.com/android/repository/samples-17_r01.zip |
42 |
http://dl-ssl.google.com/android/repository/platform-tools_r16-windows.zip |
43 |
http://dl-ssl.google.com/android/repository/platform-tools_r16-linux.zip |
44 |
http://dl-ssl.google.com/android/repository/platform-tools_r16-macosx.zip |
45 |
http://dl-ssl.google.com/android/repository/tools_r21-windows.zip |
46 |
http://dl-ssl.google.com/android/repository/tools_r21-linux.zip |
47 |
http://dl-ssl.google.com/android/repository/tools_r21-macosx.zip |
48 |
http://dl-ssl.google.com/android/repository/tools_r21.0.1_rc1-windows.zip |
49 |
http://dl-ssl.google.com/android/repository/tools_r21.0.1_rc1-linux.zip |
50 |
http://dl-ssl.google.com/android/repository/tools_r21.0.1_rc1-macosx.zip |
51 |
http://dl-ssl.google.com/android/repository/docs-17_r01.zip |
52 |
http://dl-ssl.google.com/android/repository/sources-14_r01.zip |
53 |
http://dl-ssl.google.com/android/repository/sources-15_r02.zip |
54 |
http://dl-ssl.google.com/android/repository/sources-16_r02.zip |
55 |
http://dl-ssl.google.com/android/repository/sources-17_r01.zip |
56 |
http://dl-ssl.google.com/android/repository/google_apis-3-r03.zip |
57 |
http://dl-ssl.google.com/android/repository/google_apis-4_r02.zip |
58 |
http://dl-ssl.google.com/android/repository/google_apis-5_r01.zip |
59 |
http://dl-ssl.google.com/android/repository/google_apis-6_r01.zip |
60 |
http://dl-ssl.google.com/android/repository/google_apis-7_r01.zip |
61 |
http://dl-ssl.google.com/android/repository/google_apis-8_r02.zip |
62 |
http://dl-ssl.google.com/android/repository/google_apis-9_r02.zip |
63 |
http://dl-ssl.google.com/android/repository/google_apis-10_r02.zip |
64 |
http://dl-ssl.google.com/android/repository/google_apis-11_r01.zip |
65 |
http://dl-ssl.google.com/android/repository/google_apis-12_r01.zip |
66 |
http://dl-ssl.google.com/android/repository/google_apis-13_r01.zip |
67 |
http://dl-ssl.google.com/android/repository/google_apis-14_r02.zip |
68 |
http://dl-ssl.google.com/android/repository/google_apis-15_r02.zip |
69 |
http://dl-ssl.google.com/android/repository/google_apis-16_r03.zip |
70 |
http://dl-ssl.google.com/android/repository/google_tv-12_r02.zip |
71 |
http://dl-ssl.google.com/android/repository/google_apis-17_r01.zip |
72 |
http://dl-ssl.google.com/android/repository/support_r11.zip |
73 |
http://dl-ssl.google.com/android/repository/market_licensing-r02.zip |
74 |
http://dl-ssl.google.com/android/repository/market_apk_expansion-r02.zip |
75 |
http://dl-ssl.google.com/android/repository/google_play_services_2010110_r03.zip |
76 |
http://dl-ssl.google.com/android/repository/usb_driver_r07-windows.zip |
77 |
http://dl-ssl.google.com/android/repository/market_billing_r02.zip |
78 |
https://dl-ssl.google.com/googleadmobadssdk/googleadmobadssdkandroid-6.2.1.zip |
79 |
https://dl.google.com/gaformobileapps/GoogleAnalyticsAndroid_1.4.2.zip |
80 |
http://dl-ssl.google.com/android/repository/webdriver_r02.zip |
81 |
http://dl-ssl.google.com/android/repository/gcm_r03.zip |
82 |
http://dl-ssl.google.com/android/repository/addon_intel_sysimg_2.3.7_api-10.zip |
83 |
http://dl-ssl.google.com/android/repository/http://download-software.intel.com/sites/landingpage/android/extra_intel_haxm-windows_r02.zip |
84 |
http://dl-ssl.google.com/android/repository/http://download-software.intel.com/sites/landingpage/android/extra_intel_haxm-macosx_r02.zip |
85 |
http://dl-ssl.google.com/android/repository/http://d2a85uzpvoidrc.cloudfront.net/sysimg_mips-15_r01.zip |
86 |
http://dl-ssl.google.com/android/repository/http://d2a85uzpvoidrc.cloudfront.net/sysimg_mips-16_r02.zip |
87 |
http://download-software.intel.com/sites/landingpage/android/sysimg_x86-15_r01.zip |
88 |
http://download-software.intel.com/sites/landingpage/android/sysimg_x86-16_r01.zip |