Android SDK三種更新失敗及其解決方案_Android

來源:互聯網
上載者:User

最近在網上看Moto 360的圖片,真是帥,帥了又帥,比帥更帥。所以想研究下Android wear。

更新Android SDK,居然失敗了三次。

1.第一次失敗

出現Failed to fetch URL錯誤提示

Failed to fetch URL https://dl-ssl.google.com/android/repository/repository-6.xml, reason: Connection to https://dl-ssl.google.com refused Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list-1.xml, reason: Connection to http://dl-ssl.google.com refused Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-1.xml, reason: hostname in certificate didn't match:!= 更新ADT時無法解析https://dl-ssl.google.com/android/eclipse

解決辦法

開啟C:\Windows\System32\drivers\etc檔案夾,將hosts檔案複製到案頭,用文本編輯軟體(如Subline Text2)開啟hosts檔案。增加一行:74.125.237.1 dl-ssl.google.coms

修改好之後,將修改了的hosts檔案替換C:\Windows\System32\drivers\etc檔案夾下的hosts檔案。

2.第二次失敗

將hosts檔案修改後,滿心歡喜地發現出現了新的API,傳說中的Android L。安裝更新,也有速度。可是下載途中出現了如下的錯誤提示:

Download interrupted:Unexpected HTTP Status:500

下載中斷,意想不到的HTTP狀態:500。Google了一下,發現是伺服器端的問題。

解決辦法:

首先下載zym,這是一個Proxy 伺服器軟體。如下,Proxy 位址為127.0.0.1,連接埠號碼為8580。

然後點擊Android SDK Manager的tools選項,選擇Settings。將HTTPProxy 伺服器地址設為上面那個軟體的127.0.0.1,代理連接埠設為8580。勾選強制使用https://代替http://。

最後,大功告成。

3.第三次失敗

居然又失敗了,雖然SDK能下載,但是最後一個包都沒有安裝成功。見下圖。

簡直坑爹,Google了一下,在StackOverFlow上看到了同樣的問題。

解決辦法

同樣的,Android SDK Manager,依次點擊tools,Settings,Clear Cache。如下

Oh yes!成功更新!!!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.