首页 > 程序开发 > 移动开发 > Android >

Android SDK下载和更新失败的解决方法

2015-06-16

使用sdk manager更新sdk等时可能会发现在更新的过程中出现如下错误信息: Fetching https: dl-ssl google com android repository addons_list-2 xml Fetched Add-ons List successfully Fetching URL:

使用sdk manager更新sdk等时可能会发现在更新的过程中出现如下错误信息:

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
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
Failed to fetch URL https://dl-ssl.google.com/android/repository/repository-8.xml, reason: HttpHostConnect Connection to https://dl-ssl.google.com refused
Done loading packages.

搜索网上解决方案无数,有的可行有的不可行,进行了一下统一汇总,就在这简单描述一下吧~(亲测可行)

1.在本机host文件中进行如下配置:

#Google主页
203.208.46.146 www.google.com
#这行是为了方便打开Android开发官网 现在好像不VPN也可以打开
#74.125.113.121 developer.android.com
#更新的内容从以下地址下载
203.208.46.146 dl.google.com
203.208.46.146 dl-ssl.google.com
74.125.237.1 dl-ssl.google.com

2.启动 Android SDK Manager ;
3.打开主界面,依次选择「Tools」、「Options...」,弹出『Android SDK Manager - Settings』窗口;
4.在『Android SDK Manager - Settings』窗口中,在「HTTP Proxy Server」和「HTTP Proxy Port」输入框内填入mirrors.neusoft.edu.cn和80,并且选中「Force https://... sources to be fetched using http://...」复选框;4.设置完成后单击「Close」按钮关闭『Android SDK Manager - Settings』窗口返回到主界面;
6.依次选择「Packages」、「Reload」

如上,解决~

相关文章
最新文章
热点推荐