Android SDK更新过程中出现connection refused 或者 error问题(Windows 和Ubuntu安装过程中的问题)

来源:互联网 发布:sql 别名的使用 编辑:程序博客网 时间:2024/05/21 03:20

windows:

Android SDK更新过程中出现connection refused 或者 error问题,如:Failed to fectch URl https://dl-ssl.google.com/android/repository/addons_list.xml, reason: Connection to https://dl-ssl.google.com refused,出现这个问题的原因是就是DNS反向解析域名到IP地址时间过长,时间超时所致。如果知道域名的IP地址,这个问题就会迎刃而解。解决方法如下:

  • 用notepad(文本编辑器)打开C:\WINDOWS\system32\drivers\etc中的hosts文件
  • 在最后一行添加74.125.237.1 dl-ssl.google.com
  • 成功解决问题。



Ubuntu:

Ubuntu系统的Hosts只需修改/etc/hosts文件,在目录中还有一个hosts.conf文件(对应windows系统下面的hosts文件),刚开始还以为只需要修改这个就可以了,结果发现需要修改hosts,修改完之后要重启网络。
具体过程如下:
1、修改hosts
sudo gedit /etc/hosts
2、添加解析记录
完整案例:74.125.237.1 dl-ssl.google.com
3、保存后重启网络(或者重启Ubuntu系统)
sudo /etc/init.d/networking restart





希望对大家有所帮助。

原创粉丝点击