在上一节安装Android SDK后,在更新平台组件过程中,会出现下载和更新失败的情况,如:Failed to fectch URl https://dl-ssl.google.com/android/repository/addons_list-2.xml, reason: Connection to https://dl-ssl.google.com refused,意思是拒绝连接更新服务网站,这里提供可行解决方法。
方法/步骤
1
找到C:\Windows\System32\drivers\etc\hosts文件,用记事本打开。
2
打开后修改hosts文件,在文本最后添加一行:203.208.46.146 dl-ssl.google.com,做本地域名解析。
3
在SDK Manager工具栏,点击Tools->Options打开了SDK Manager的Settings,选中“Force https://… sources to be fetched using http://…”,强制使用http协议。
4
重新打开SDK Manager更新组件,不再提示错误,点击Install ...就可以更新了。