如何解决Android SDK Manager 更新失败
推荐于2016-11-16 · 知道合伙人数码行家
知道合伙人数码行家
向TA提问 私信TA
方法/步骤
选取需要更新的组件后,点击Install packages来获取组件。出现如下错误:
Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml
Fetched Add-ons List successfully
Fetching URL: https://dl-ssl.google.com/android/repository/repository-7.xml
Done loading packages.
Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml
Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-2.xml, reason: peer not authenticated
Fetched Add-ons List successfully
Fetching URL: https://dl-ssl.google.com/android/repository/repository-7.xml
Failed to fetch URL https://dl-ssl.google.com/android/repository/repository-7.xml, reason: SSLPeerUnverified peer not authenticated
Done loading packages.
在终端中运行:
$ sudo gedit /etc/hosts
添加如下内容:
# for android
74.125.237.1 dl-ssl.google.com
使配置生效:
$ source /etc/hosts
重新执行第一步。得到如下图所示输出,等待更新完成。