Android SDK更新无法完成
由于**原因,下载更新Android SDK时总会遇到下面错误
Failed to fetch URL https://dl-ssl.google.com/android/repository/repository-6.xml, reason: Connection to https://dl-ssl.google.com refused
Download interrupted: hostname in certificate didn't match: <dl-ssl.google.com> != <www.google.com>
Download interrupted: Connection to https://dl-ssl.google.com refused
Done. Nothing was installed.
解决办法:
一、修改host文件:
Windows在C:\WINDOWS\system32\drivers\etc\hosts,Linux用户打开/etc/hosts文件。
在hosts文件地下添加
203.208.46.146 www.google.com
74.125.113.121 developer.android.com
203.208.46.146 dl.google.com
203.208.46.146 dl-ssl.google.com
二、把更新方式https 改成http
打开Android SDK Manager —> 菜单tools —> 勾选Force https://... sources to be fetched using http://...

三、重新更新下载所要SDK包

浙公网安备 33010602011771号