通過SDK Manager進行更新時,總是提示
Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list.xml, reason: Connection to https://dl-ssl.google.com refused
很多網友也都說這些更新網站訪問不了,大概是https 與 http的原因,https協議涉及到網站信息的加密,總是會出現問題。網上提供的一種解決方法是在SDK Manager ->Tools裏面設置,將https強制轉化爲http連接。可是我怎麼也總不到這個選項,嘗試Add new external add-on sites (以http協議傳輸),仍然失敗,錯誤信息如下:
ERROR: Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list-1.xml, reason: hostname in certificate didn't match: <dl-ssl.google.com> != <www.google.com>
究竟該如何通過http協議訪問更新呢? 功夫不負有心人,求助萬能的Google,終於發現另一種解決方案!
找到C:\Documents and Settings\Administrator\.android\androidtool.cfg文件,在最後一行加入
sdkman.force.http=true
保存,關閉,打開eclipse->SDK Manager, checked tools下面的兩個方件夾,開始SDK Tools和SDK platform-tools的更新。
重啓,測試Hello Android, 問題解決!