【已解决】ADT中通过Android SDK Manager去安装x86的image时无法下载

【已解决】ADT中通过Android SDK Manager去安装x86的image时无法下载

折腾:

【已解决】ADT中调试Android项目但是无法打开对应的AVD即没有弹出对应的Android虚拟机

期间,

遇到问题:

ADT中Android SDK Manager无法下载x86的image

Downloading SDK Platform Android 4.1.2, API 16, revision 3 
Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-2.xml, reason: Connection to https://dl-ssl.google.com refused 
Fetched Add-ons List successfully 
Fetching URL: https://dl-ssl.google.com/android/repository/repository-8.xml 
Download interrupted: Connection to https://dl-ssl.google.com refused 
Skipping ‘Intel x86 Atom System Image, Android API 16, revision 1′; it depends on ‘SDK Platform Android 4.1.2, API 16, revision 3′ which was not installed. 
Done. Nothing was installed.

如图:

【已解决】ADT中通过Android SDK Manager去安装x86的image时无法下载_第1张图片

【解决过程】

1.参考:

Android sdk manager doesnt download packages

去强制设置为https:

【已解决】ADT中通过Android SDK Manager去安装x86的image时无法下载_第2张图片

【已解决】ADT中通过Android SDK Manager去安装x86的image时无法下载_第3张图片

2.然后再去试试,貌似就可以了:

Fetching URL: http://software.intel.com/sites/landingpage/android/addon.xml 
Validate XML: http://software.intel.com/sites/landingpage/android/addon.xml 
Parse XML:    http://software.intel.com/sites/landingpage/android/addon.xml 
  Found Intel Atom x86 System Image, Android API 10, revision 1 
  Found Intel x86 Emulator Accelerator (HAXM), revision 2 
Fetching URL: https://dl-ssl.google.com/android/repository/sys-img.xml

结果还是不行:

Failed to fetch URL https://dl-ssl.google.com/android/repository/sys-img.xml, reason: HttpHostConnect Connection to https://dl-ssl.google.com refused 
Fetching URL: http://www.mips.com/global/sdk-sys-img.xml

3.参考:

android 更新SDK问题reason: Connection to https://dl-ssl.google.com refused

去修改Hosts文件:

C:\Windows\System32\drivers\etc\hosts

最后加上对应配置,为:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host
 
# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localhost
#   ::1             localhost
74.125.31.120 ssl.gstatic.com
# download android sdk from google fuck cn
74.125.237.1 dl-ssl.google.com

然后,重启ADT,再去试试。

结果,重启后,SDK Manager,都找不到哪些可以选择的安装的东西了。

后来还是自己摸索,清除了cache:

【已解决】ADT中通过Android SDK Manager去安装x86的image时无法下载_第4张图片

然后其会自动重新获取list,才看到一堆可供选择的项的:

then can reshow all related image

4.重新去选择x86的image,然后看看是否可以下载了。

结果,却发现,又找不到x86的image了。。。

又重启了ADT,重新打开SDK Manager,才终于能看到x86的image了:

【已解决】ADT中通过Android SDK Manager去安装x86的image时无法下载_第5张图片

最终,终于可以下载x86的image了:

【已解决】ADT中通过Android SDK Manager去安装x86的image时无法下载_第6张图片

注:

此处,没有选择那个Force https:// … sources to be fetched using http://…

【已解决】ADT中通过Android SDK Manager去安装x86的image时无法下载_第7张图片

然后加上之前C:\Windows\System32\drivers\etc\hosts中加了:

?
1
2
# download android sdk from google fuck cn
74.125.237.1 dl-ssl.google.com

然后才可以正常下载东西的:

【已解决】ADT中通过Android SDK Manager去安装x86的image时无法下载_第8张图片

5.贴出截止目前的log:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml
Fetched Add-ons List successfully
Fetching URL: https://dl-ssl.google.com/android/repository/repository-8.xml
Done loading packages.
Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml
Validate XML
Parse XML
Fetched Add-ons List successfully
Fetching URL: https://dl-ssl.google.com/android/repository/repository-8.xml
Validate XML: https://dl-ssl.google.com/android/repository/repository-8.xml
Parse XML:    https://dl-ssl.google.com/android/repository/repository-8.xml
   Found SDK Platform Android 1.1, API 2, revision 1 (Obsolete)
   Found SDK Platform Android 1.5, API 3, revision 4
   Found SDK Platform Android 1.6, API 4, revision 3
   Found SDK Platform Android 2.0, API 5, revision 1 (Obsolete)
   Found SDK Platform Android 2.0.1, API 6, revision 1 (Obsolete)
   Found SDK Platform Android 2.1, API 7, revision 3
   Found SDK Platform Android 2.2, API 8, revision 3
   Found SDK Platform Android 2.3.1, API 9, revision 2 (Obsolete)
   Found SDK Platform Android 2.3.3, API 10, revision 2
   Found SDK Platform Android 3.0, API 11, revision 2
   Found SDK Platform Android 3.1, API 12, revision 3
   Found SDK Platform Android 3.2, API 13, revision 1
   Found SDK Platform Android 4.0, API 14, revision 3
   Found SDK Platform Android 4.0.3, API 15, revision 3
   Found SDK Platform Android 4.1.2, API 16, revision 4
   Found SDK Platform Android 4.2.2, API 17, revision 2
   Found SDK Platform Android 4.3, API 18, revision 2
   Found SDK Platform Android 4.4, API 19, revision 1
   Found ARM EABI v7a System Image, Android API 14, revision 2
   Found ARM EABI v7a System Image, Android API 15, revision 2
   Found ARM EABI v7a System Image, Android API 16, revision 3
   Found ARM EABI v7a System Image, Android API 17, revision 2
   Found ARM EABI v7a System Image, Android API 18, revision 2
   Found ARM EABI v7a System Image, Android API 19, revision 1
   Found Samples for SDK API 7, revision 1
   Found Samples for SDK API 8, revision 1
   Found Samples for SDK API 9, revision 1 (Obsolete)
   Found Samples for SDK API 10, revision 1
   Found Samples for SDK API 11, revision 1
   Found Samples for SDK API 12, revision 1
   Found Samples for SDK API 13, revision 1
   Found Samples for SDK API 14, revision 2
   Found Samples for SDK API 15, revision 2
   Found Samples for SDK API 16, revision 1
   Found Samples for SDK API 17, revision 1
   Found Samples for SDK API 18, revision 1
   Found Samples for SDK API 19, revision 1
   Found Android SDK Platform-tools, revision 19
   Found Android SDK Build-tools, revision 17
   Found Android SDK Build-tools, revision 18.0.1
   Found Android SDK Build-tools, revision 18.1
   Found Android SDK Build-tools, revision 18.1.1
   Found Android SDK Build-tools, revision 19
   Found Android SDK Tools, revision 22.3
   Found Documentation for Android SDK, API 19, revision 1
   Found Sources for Android SDK, API 14, revision 1
   Found Sources for Android SDK, API 15, revision 2
   Found Sources for Android SDK, API 16, revision 2
   Found Sources for Android SDK, API 17, revision 1
   Found Sources for Android SDK, API 18, revision 1
   Found Sources for Android SDK, API 19, revision 1
Fetching URL: https://dl-ssl.google.com/android/repository/addon.xml
Validate XML: https://dl-ssl.google.com/android/repository/addon.xml
Parse XML:    https://dl-ssl.google.com/android/repository/addon.xml
   Found Google APIs, Android API 3, revision 3
   Found Google APIs, Android API 4, revision 2
   Found Google APIs, Android API 5, revision 1 (Obsolete)
   Found Google APIs, Android API 6, revision 1 (Obsolete)
   Found Google APIs, Android API 7, revision 1
   Found Google APIs, Android API 8, revision 2
   Found Google APIs, Android API 9, revision 2 (Obsolete)
   Found Google APIs, Android API 10, revision 2
   Found Google APIs, Android API 11, revision 1
   Found Google APIs, Android API 12, revision 1
   Found Google APIs, Android API 13, revision 1
   Found Google APIs, Android API 14, revision 2
   Found Google APIs, Android API 15, revision 2
   Found Google APIs, Android API 16, revision 3
   Found Google APIs, Android API 17, revision 3
   Found Google APIs, Android API 18, revision 3
   Found Google APIs, Android API 19, revision 1
   Found Google TV Addon, Android API 12, revision 2
   Found Google TV Addon, Android API 13, revision 1
   Found Android Support Library, revision 19
   Found Android Support Repository, revision 3
   Found Google Repository, revision 4
   Found Google Play Licensing Library, revision 2
   Found Google Play APK Expansion Library, revision 3
   Found Google Play services for Froyo, revision 12
   Found Google Play services, revision 13
   Found Google USB Driver, revision 8
   Found Google Play Billing Library, revision 5
   Found Google AdMob Ads SDK, revision 11
   Found Google Analytics App Tracking SDK, revision 3
   Found Google Web Driver, revision 2
   Found [Deprecated] Google Cloud Messaging for Android Library, revision 3
Fetching URL: https://dl-ssl.google.com/android/repository/extras/intel/addon.xml
Validate XML: https://dl-ssl.google.com/android/repository/extras/intel/addon.xml
Parse XML:    https://dl-ssl.google.com/android/repository/extras/intel/addon.xml
   Found Intel x86 Emulator Accelerator (HAXM), revision 3
Fetching URL: https://dl-ssl.google.com/android/repository/sys-img.xml
Validate XML: https://dl-ssl.google.com/android/repository/sys-img.xml
Parse XML:    https://dl-ssl.google.com/android/repository/sys-img.xml
Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/mips/sys-img.xml
Validate XML: https://dl-ssl.google.com/android/repository/sys-img/mips/sys-img.xml
Parse XML:    https://dl-ssl.google.com/android/repository/sys-img/mips/sys-img.xml
   Found MIPS System Image, Android API 15, revision 1
   Found MIPS System Image, Android API 16, revision 4
   Found MIPS System Image, Android API 17, revision 1
Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/x86/sys-img.xml
Validate XML: https://dl-ssl.google.com/android/repository/sys-img/x86/sys-img.xml
Parse XML:    https://dl-ssl.google.com/android/repository/sys-img/x86/sys-img.xml
   Found Intel x86 Atom System Image, Android API 10, revision 2
   Found Intel x86 Atom System Image, Android API 15, revision 1
   Found Intel x86 Atom System Image, Android API 16, revision 1
   Found Intel x86 Atom System Image, Android API 17, revision 1
   Found Intel x86 Atom System Image, Android API 18, revision 1
Done loading packages.
Preparing to install archives
Downloading Android SDK Platform-tools, revision 19
Installing Android SDK Platform-tools, revision 19
Stopping ADB server succeeded.
Installed Android SDK Platform-tools, revision 19
Downloading SDK Platform Android 4.3, API 18, revision 2
Installing SDK Platform Android 4.3, API 18, revision 2
Installed SDK Platform Android 4.3, API 18, revision 2
Downloading SDK Platform Android 4.1.2, API 16, revision 4
Installing SDK Platform Android 4.1.2, API 16, revision 4
Installed SDK Platform Android 4.1.2, API 16, revision 4
Downloading Intel x86 Atom System Image, Android API 17, revision 1
Installing Intel x86 Atom System Image, Android API 17, revision 1
Installed Intel x86 Atom System Image, Android API 17, revision 1
Downloading Android Support Library, revision 19
Installing Android Support Library, revision 19
Installed Android Support Library, revision 19
Downloading Google USB Driver, revision 8
Installing Google USB Driver, revision 8
Installed Google USB Driver, revision 8
Downloading Intel x86 Emulator Accelerator (HAXM), revision 3
Installing Intel x86 Emulator Accelerator (HAXM), revision 3
Installed Intel x86 Emulator Accelerator (HAXM), revision 3
Downloading Android SDK Tools, revision 22.3
Installing Android SDK Tools, revision 22.3
[post_tools_install.bat] Updating SDK Manager.exe
[post_tools_install.bat]         1 file(s) copied.
[post_tools_install.bat] Updating AVD Manager.exe
[post_tools_install.bat]         1 file(s) copied.
Installed Android SDK Tools, revision 22.3
Downloading Intel x86 Atom System Image, Android API 18, revision 1
Installing Intel x86 Atom System Image, Android API 18, revision 1
Installed Intel x86 Atom System Image, Android API 18, revision 1
Downloading Intel x86 Atom System Image, Android API 16, revision 1

觉得

Intel x86 Atom System Image, Android API 16

下载的太慢了,取消算了。。。。

【已解决】ADT中通过Android SDK Manager去安装x86的image时无法下载_第9张图片

然后接着重新去下载,结果速度果然从之前的35KB/s到现在更快的100多KB/s了。

6.最后,终于安装完毕了:

install all x86 images done 1

【已解决】ADT中通过Android SDK Manager去安装x86的image时无法下载_第10张图片

 

【总结】

此处,是:

(1)没有选择那个:

Android SDK Manager -> Tools-> Force https:// … sources to be fetched using http://…

(2)给

C:\Windows\System32\drivers\etc\hosts

中加了:

?
1
2
# download android sdk from google fuck cn
74.125.237.1 dl-ssl.google.com

然后才可以正常下载Android的各种包的,包括此处我想要下载的一堆的x86的image。

你可能感兴趣的:(android,环境搭建)