最近玩ubuntu系统,以前windows下下载的SDK文件不能用了,只能重新下载,安装完Eclipse和ADT插件,却发现无法更新SDK,显示为:
Fetching https://dl-ssl.google.com/android/repository/addons_list-1.xml
Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-1.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-6.xml
Eclipse输出错误
reason: Connection to https://dl-ssl.google.com refused
估计这又是伟大GFW的功劳,我们只需要配置一下hosts文件,在文件的末尾添加下面一句:
74.125.237.1 dl-ssl.google.com
windows系统中hosts文件的位置为:C:\Windows\System32\drivers\etc ,找到该文件并已文本形式打开,添加上面一句话,保存之后关闭,重启Eclipse打开Android SDK Manager,ok!
Ubuntu系统hosts文件的位置为:/etc/hosts,可以通过命令:
sudo gedit /etc/hosts对该文件进行编辑
Fetching https://dl-ssl.google.com/android/repository/addons_list-1.xml
Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-1.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-6.xml
Eclipse输出错误
reason: Connection to https://dl-ssl.google.com refused
估计这又是伟大GFW的功劳,我们只需要配置一下hosts文件,在文件的末尾添加下面一句:
74.125.237.1 dl-ssl.google.com
windows系统中hosts文件的位置为:C:\Windows\System32\drivers\etc ,找到该文件并已文本形式打开,添加上面一句话,保存之后关闭,重启Eclipse打开Android SDK Manager,ok!
Ubuntu系统hosts文件的位置为:/etc/hosts,可以通过命令:
sudo gedit /etc/hosts对该文件进行编辑