问题描述
使用SDK Manager更新时出现问题
Failed to fetch URL https://dl-ssl.google.com/android/repository/repository-6.xml, reason: Connection to https://dl-ssl.google.com refused
Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list-1.xml, reason: Connection to http://dl-ssl.google.com refused
Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-1.xml, reason: hostname in certificate didn't match: <dl-ssl.google.com> != <www.google.com>
更新ADT时无法解析https://dl-ssl.google.com/android/eclipse
解决办法
由于某些众所周知又无法理解的原因,我们大陆使用Google的服务会出现种种问题,譬如Android开发也会出现阻碍。不过首先要说明的是一般情况下使用SDK Manager更新或者更新Eclipse的ADT插件是没有问题的,我以前也能正常更新,但是昨天不知道节点抽什么风,压根无法连接服务器,出现了上边的种种问题,下面说一下如果网络抽风的话应该如何解决问题。
第一种方法一劳永逸,直接配置VPN,但是现在想找个速度快又稳定还免费的VPN实在不易,尤其是更新SDK,以几kb/s的速度一个文件需要400多分钟,所以也就放弃了VPN。
另一种方法是使用http协议而不是https协议,因为https协议进行了加密处理,大陆因为无法审查,直接封死,而http协议则进行过滤处理,如果不访问乱七八糟的东西,更新个SDK还是没问题的。
在SDK Manager下Tools->Options打开了SDK Manager的Settings,选中“Force https://… sources to be fetched using http://…”,强制使用http协议。
而在更新ADT插件的时候则使用网址http://dl-ssl.google.com/android/eclipse,而不是https://dl-ssl.google.com/android/eclipse,这个在官方开发文档里也有介绍。
但是昨天的情况就是使用http协议也无法访问。
再说一个比较麻烦的方法,就是直接打开
https://dl-ssl.google.com/android/repository/addons_list.xml
https://dl-ssl.google.com/android/repository/repository.xml
https://dl-ssl.google.com/android/repository/addon.xml
这几个文件,找到你要下载的文件名,直接用迅雷下载,ADT可以直接在官网下载ADT包进行安装。具体方法自己搜索。
最好的方法还是改hosts文件的方法,更新速度较快。Windows在C:\WINDOWS\system32\drivers\etc目录下,Linux用户打开/etc/hosts文件。
打开文件后添加以下内容。
#Google主页
203.208.46.146 www.google.com
#这行是为了方便打开Android开发官网 现在好像不翻蔷也可以打开
74.125.113.121 developer.android.com
#更新的内容从以下地址下载
203.208.46.146 dl.google.com
203.208.46.146 dl-ssl.google.com
最后成功解决此问题的方法是 “勾上强制转换+ Hosts文件修改”
转自:
http://blog.csdn.net/foxeatapple/article/details/8450372
分享到:
相关推荐
Failed to fectch URl ... 安装使用SDK Manager更新时出现问题 Failed to fetch URL https://dl-ssl.google.com/android/repository/repository-6.xml, reason: Connection to https://dl-ssl.google.co
Failed to fetch URL https://dl-ssl.google.com/android/repository/repository-6.xml, reason: Connection to https://dl-ssl.google.com refused Failed to fetch URL http://dl-ssl.google.com/androi
Refused to apply style from ‘http://localhost:8080/static/css/style.css’ because its MIME type (‘application/json’) is not a supported stylesheet MIME type, and strict MIME checking is enabled. ...
用于解决如下错误 fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle fatal: error [Errno 101] Network is unreachable 2016/07/24更新 由于清华大学TUNA镜像源关闭了git://协议,仅支持...
Connect to dl.google.com:443 [dl.google.com/203.208.43.98, dl.google.com/203.208.43.96, dl.google.com/203.208.43.103, dl.google.com/203.208.43.100, dl.google.com/203.208.43.105, dl.google....
airflow的安装文件constraints-3.9.txt
报错:Exception in thread “main” java.net.ConnectException: Call From hdp-1/192.168.234.129 to hdp-1:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more ...
ssh: connect to host 192.168.136.130 port 22: Connection refused,Fodera 远程连接失败 1.首先确认是否安装process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3...
./configure --with-c-compiler=arm-linux-androideabi-gcc ./configure --with-c-compiler=arm-hisiv500-linux-gcc arm-hisiv500-linux- netkit-ftp-0.17/configure ftp -n ftp: connect: Connection refused...
./configure --with-c-compiler=arm-linux-androideabi-gcc ./configure --with-c-compiler=arm-hisiv500-linux-gcc arm-hisiv500-linux- netkit-ftp-0.17/configure ftp -n ftp: connect: Connection refused...
#Xlib: connection to ":0.0" refused by server Xlib: No protocol specified 错误三 warning: Cannot convert string "-isas-song ti-medium-r-normal--*-140-*-*-c-*-gb2312.1980-0" to type 错误四 Checking ...
Zebra Browser Print is a set of scripts and an end-user application that allows web pages to communicate with Zebra Printers. The application lets a web page communicate to Zebra devices accessible ...
Caused by: java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574) at ...
pdf.js前端插件,通过window.open(basePath + '/pdfjs/web/viewer.html?file=' + fileUrl);即可在线预览pdf文件
主要介绍了Linux 出现telnet: connect to address 127.0.0.1: Connection refused错误解决办法的相关资料,需要的朋友可以参考下
主要介绍了java.net.ConnectException: Connection refused问题解决办法的相关资料,需要的朋友可以参考下
很多的人都遇到过挂载NFS的问题。特别是刚接触ARM/LINUX的同学,遇到了这个问题都不知道怎么办!下面我就把这些东西都总结出来了。请看看吧!
常见问题:./runInstaller前缺包报错:Xlib: connection to ":0.0" refused by server 169 常见问题:./runInstaller前权限报错:/oracle/product/10.2.0/db_1.. 170 常见问题:通过命令给Linux(CentOS)分区.... ...
专题资料