Android(安卓)SDK Manager无法更新解决方法
使用SDK Manager更新时出现问题 Failed to fetch URLhttps://dl-ssl.google.com/android/repository/repository-6.xml, reason: Connection tohttps://dl-ssl.google.comrefused Failed to fetch URLhttp://dl-ssl.google.com/android/repository/addons_list-1.xml, reason: Connection tohttp://dl-ssl.google.comrefused Failed to fetch URLhttps://dl-ssl.google.com/android/repository/addons_list-1.xml, reason: hostname in certificate didn't match: <dl-ssl.google.com> != <www.google.com> 更新ADT时无法解析https://dl-ssl.google.com/android/eclipse
可以用以下办法解决:
由于某些众所周知又无法理解的原因,我们大陆使用Google的服务会出现种种问题,譬如Android开发也会出现阻碍。一种方法是使用http协议而不是https协议,因为https协议进行了加密处理,大陆因为无法审查,直接封死,而http协议则进行过滤处理,如果不访问乱七八糟的东西,更新个SDK还是没问题的。
解决方法如下:
1.ADT更新
更新ADT插件的时候则使用网址http://dl-ssl.google.com/android/eclipse,而不是https://dl-ssl.google.com/android/eclipse,这个在官方开发文档里也有介绍。 但是昨天的情况就是使用http协议也无法访问。对于ADT还是建议手动下载。
2. SDK更新
1)在SDK Manager下Tools->Options打开了SDK Manager的Settings,选中“Force https://… sources to be fetched using http://…”,强制使用http协议。
2) 然后改hosts文件。Windows在C:\WINDOWS\system32\drivers\etc\hosts目录下,Linux用户打开/etc/hosts文件。
使用以下工具修改host:http://blog.csdn.net/scry5566/article/details/44223323
更多相关文章
- Android(安卓)Studio 3.2.1找不到Android(安卓)Device Monitor
- 使用外部下载工具下载 Android(安卓)SDK
- 在服务器上使用 gradle 打包 android 源码
- android在service中使用AsyncHttpClient加载网络资源
- EditText
- Android(安卓)使用Telephony API
- 最常用的GitHub—— Android(安卓)开源项目整理(精品)
- Android(安卓)TextView跑马灯抖动问题
- GridView, ListView 区别