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解决禁止使用http协议的方案
- Android API开发之蓝牙开发之Android蓝牙开发GATT协议
- Android P(api28) 不支持 http 协议解决方法
- Android通过http协议POST传输方式(输出流提交到服务端)
- 微软的 Android 计划:邪恶的天才计划或只是邪恶?
- Andriod AOA协议通信总结
- Android 网络协议
- 【Android】HTTP协议的经典讲解
- Catalog Service - 解析微软微服务架构实例代码