码迷,mamicode.com
首页 > 移动开发 > 详细

Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list-2.xml, reason:

时间:2014-06-26 20:41:54      阅读:918      评论:0      收藏:0      [点我收藏+]

标签:android   blog   http   ext   com   使用   

最近接受的这个项目需要Android SDK Tools revision 22.6.2 or above.,所以必须得更新SDK,

然而在SDKmanager中更新android SDK 总是提示:

Fetching http://dl-ssl.google.com/android/repository/addons_list-2.xml
Fetched Add-ons List successfully
Fetching URL: http://dl-ssl.google.com/android/repository/repository-8.xml
Done loading packages.
Fetching http://dl-ssl.google.com/android/repository/addons_list-2.xml
Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list-2.xml, reason: Unknown Host http://proxy.global.sonyericsson.net
Fetched Add-ons List successfully
Fetching URL: http://dl-ssl.google.com/android/repository/repository-8.xml
Failed to fetch URL http://dl-ssl.google.com/android/repository/repository-8.xml, reason: IO Unknown Host http://proxy.global.sonyericsson.net
Done loading packages.

在网上查了很多方法想 修改hosts文件、设置代理等不可行,最后只能通过有点麻烦的方法解决了

1.下载3个xml文件:

http://dl-ssl.google.com/Android/repository/addon.xml
http://dl-ssl.google.com/Android/repository/repository.xml

http://dl-ssl.google.com/Android/repository/repository-5.xml

2.根据xml文件中的内容获取下载zip包的连接如下:

==========================================================================
<!-- http://dl-ssl.google.com/Android/repository/addon.xml begin-->

<!--  ADD-ONS ....................... -->
http://dl-ssl.google.com/Android/repository/google_apis-3-r03.zip
http://dl-ssl.google.com/Android/repository/google_apis-4_r02.zip
http://dl-ssl.google.com/Android/repository/google_apis-5_r01.zip
http://dl-ssl.google.com/Android/repository/google_apis-6_r01.zip
http://dl-ssl.google.com/Android/repository/google_apis-7_r01.zip
http://dl-ssl.google.com/Android/repository/google_apis-8_r02.zip
http://dl-ssl.google.com/Android/repository/google_apis-9_r02.zip
http://dl-ssl.google.com/Android/repository/google_apis-10_r02.zip
http://dl-ssl.google.com/Android/repository/google_apis-11_r01.zip
http://dl-ssl.google.com/Android/repository/google_apis-12_r01.zip
http://dl-ssl.google.com/Android/repository/google_apis-13_r01.zip
http://dl-ssl.google.com/Android/repository/google_apis-14_r01.zip

<!--  GOOGLE TV ADDONS ............. -->
http://dl-ssl.google.com/Android/repository/google_tv-12_r02.zip

<!--  EXTRAS ....................... -->
http://dl-ssl.google.com/Android/repository/market_licensing-r01.zip
http://dl-ssl.google.com/Android/repository/usb_driver_r04-windows.zip
http://dl-ssl.google.com/Android/repository/market_billing_r01.zip
http://dl-ssl.google.com/Android/repository/webdriver_r01.zip

<!-- http://dl-ssl.google.com/Android/repository/addon.xml end-->
==========================================================================

 

==========================================================================
<!-- http://dl-ssl.google.com/Android/repository/repository.xml begin-->

<!-- PLATFORM-TOOL ........................ -->
https://dl-ssl.google.com/Android/repository/platform-tools_r09-windows.zip

<!-- TOOLS ........................ -->
https://dl-ssl.google.com/Android/repository/tools_r15-windows.zip

<!-- http://dl-ssl.google.com/Android/repository/repository.xml end-->
==========================================================================

 

==========================================================================
<!-- http://dl-ssl.google.com/Android/repository/repository-5.xml begin-->

<!-- PLATFORMS ........................ -->
https://dl-ssl.google.com/Android/repository/android-1.1_r1-windows.zip
https://dl-ssl.google.com/Android/repository/android-1.5_r04-windows.zip
https://dl-ssl.google.com/Android/repository/android-1.6_r03-windows.zip
https://dl-ssl.google.com/Android/repository/android-2.0_r01-windows.zip
https://dl-ssl.google.com/Android/repository/android-2.0.1_r01-windows.zip
https://dl-ssl.google.com/Android/repository/android-2.1_r03-linux.zip
https://dl-ssl.google.com/Android/repository/android-2.2_r03-linux.zip
https://dl-ssl.google.com/Android/repository/android-2.3.1_r02-linux.zip
https://dl-ssl.google.com/Android/repository/android-2.3.3_r02-linux.zip
https://dl-ssl.google.com/Android/repository/android-3.0_r02-linux.zip
https://dl-ssl.google.com/Android/repository/android-3.1_r03-linux.zip
https://dl-ssl.google.com/Android/repository/android-3.2_r01-linux.zip
https://dl-ssl.google.com/Android/repository/android-14_r01.zip

https://dl-ssl.google.com/Android/repository/android-18_r01.zip

https://dl-ssl.google.com/Android/repository/android-18_r01.zip

<!-- SYSTEM IMAGES ........................ -->
https://dl-ssl.google.com/Android/repository/sysimg_armv7a-14_r01.zip

<!-- SAMPLES ........................ -->
https://dl-ssl.google.com/Android/repository/samples-2.1_r01-linux.zip
https://dl-ssl.google.com/Android/repository/samples-2.2_r01-linux.zip
https://dl-ssl.google.com/Android/repository/samples-2.3_r01-linux.zip
https://dl-ssl.google.com/Android/repository/samples-2.3.3_r01-linux.zip
https://dl-ssl.google.com/Android/repository/samples-3.0_r01-linux.zip
https://dl-ssl.google.com/Android/repository/samples-3.1_r01-linux.zip
https://dl-ssl.google.com/Android/repository/samples-3.2_r01-linux.zip
https://dl-ssl.google.com/Android/repository/samples-14_r01.zip

<!-- PLATFORM-TOOLS ........................ -->
https://dl-ssl.google.com/Android/repository/platform-tools_r08-windows.zip

<!-- TOOLS ........................ -->
https://dl-ssl.google.com/Android/repository/tools_r14-windows.zip

<!-- DOCS ........................ -->
https://dl-ssl.google.com/Android/repository/docs-14_r01.zip
https://dl-ssl.google.com/Android/repository/docs-15_r01.zip
https://dl-ssl.google.com/Android/repository/docs-16_r01.zip
https://dl-ssl.google.com/Android/repository/docs-17_r01.zip
https://dl-ssl.google.com/Android/repository/docs-18_r01.zip
https://dl-ssl.google.com/Android/repository/docs-19_r01.zip

<!-- EXTRAS ........................ -->
https://dl-ssl.google.com/Android/repository/support_r10.zip

https://dl-ssl.google.com/Android/repository/support_r11.zip

https://dl-ssl.google.com/Android/repository/support_r12.zip

https://dl-ssl.google.com/Android/repository/support_r13.zip

<!-- http://dl-ssl.google.com/Android/repository/repository-5.xml end-->

 

3.下载完后,在<sdk>/temp/文件夹中放入需要安装版本的zip包

4.运行sdk manager.exe开始安装,这是安装将跳过下载部分直接安装

5.安装完成

 使用该方法,记得一定设置android-sdk的环境变量 哦。。

参考设置android的环境变量 http://www.cnblogs.com/yuan1225/archive/2013/05/15/3079626.html

 

 

 

 

记得之前修改hosts文件可以的,但是这次却不行了

修改hosts文件。
(1)windows下打开C:\Windows\System32\drivers\etc,以管理员身份编辑hosts文件,在最后添加:
74.125.237.1 dl-ssl.google.com
(2)linux下使用命令sudo vim /etc/hosts编辑hosts文件,同样在文件最后添加
74.125.237.1 dl-ssl.google.com
然后重新运行sdk manager,就可以下载了。

设置代理:

bubuko.com,布布扣

bubuko.com,布布扣

bubuko.com,布布扣

 

 

参考文档

http://www.oschina.net/question/163910_30669

 

Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list-2.xml, reason:,布布扣,bubuko.com

Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list-2.xml, reason:

标签:android   blog   http   ext   com   使用   

原文地址:http://www.cnblogs.com/yuan1225/p/3808131.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!