SDK更新时,有可能会出现这样的错误:Download interrupted: hostname in certificate didn't match: <dl-ssl.google.com> != <www.google.com>Download interrupted: Connection to https://dl-ssl.google.com refusedDone. Nothing was installed.
经常被人告知要在host中输入
203.208.46.146 dl.google.com
203.208.46.146 dl-ssl.google.com
203.208.46.146 groups.google.com
203.208.46.146 appengine.google.com
但其实这样不完全正确. (坑苦我了,OTL...)
方法/步骤
-
将https://修改为http://修改方法是:如下图,在Android SDK Manager->Tools-Options...选项界面,将“Force https://… sources to be fetched using http://…”勾选!
-
打开http://ping.chinaz.com/
测试较快dl-ssl.google.com服务器ip地址
-
从图片上可以看出只有两个IP较快,选一个试试吧 74.125.130.190
-
打开文件(C:\Windows\System32\drivers\etc\hosts)中,添加如下几行
74.125.130.190 dl.google.com
74.125.130.190 dl-ssl.google.com
保存文件,注意360,金山等软件的提示。