Android SDK Manager 更新失敗的解決方案

來源:互聯網
上載者:User

標籤:android   style   blog   http   java   color   

Android SDK Manager 更新失敗的解決方案

原文地址

最近使用Android SDK Manager 更新Android SDK tools 發現經常更新失敗,擷取不到更新資訊:

Java代碼  
  1. Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml   
  2. Fetched Add-ons List successfully   
  3. Fetching URL: https://dl-ssl.google.com/android/repository/repository-7.xml   
  4. Done loading packages.   
  5. Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml   
  6. Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-2.xml, reason: peer not authenticated   
  7. Fetched Add-ons List successfully   
  8. Fetching URL: https://dl-ssl.google.com/android/repository/repository-7.xml   
  9. Failed to fetch URL https://dl-ssl.google.com/android/repository/repository-7.xml, reason: SSLPeerUnverified peer not authenticated   
  10. Done loading packages.  
Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xmlFetched Add-ons List successfullyFetching URL: https://dl-ssl.google.com/android/repository/repository-7.xmlDone loading packages.Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xmlFailed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-2.xml, reason: peer not authenticatedFetched Add-ons List successfullyFetching URL: https://dl-ssl.google.com/android/repository/repository-7.xmlFailed to fetch URL https://dl-ssl.google.com/android/repository/repository-7.xml, reason: SSLPeerUnverified peer not authenticatedDone loading packages.

 

 上述是Android SDK Manager Log的更新失敗的資訊,如:


 

這個資訊是網路上https的網路連接不上造成的,所以需要把https都換成http。

操作如下,點擊SDK Manager的Tools->Options


選擇 Force https://... sources to be fetched using http://

如,見紅色框處



當然如果你有VPN或公司有代理可以連上美國的google,那可以在Proxy裡面設定代理的IP和連接埠

 



 設定完後更新就會成功

 

Log的結果如下:

 

Java代碼  
  1. Fetching http://dl-ssl.google.com/android/repository/addons_list-2.xml   
  2. Fetched Add-ons List successfully   
  3. Fetching URL: http://dl-ssl.google.com/android/repository/repository-7.xml   
  4. Done loading packages.   
  5. Fetching http://dl-ssl.google.com/android/repository/addons_list-2.xml   
  6. Validate XML   
  7. Parse XML   
  8. Fetched Add-ons List successfully   
  9. Fetching URL: http://dl-ssl.google.com/android/repository/repository-7.xml   
  10. Validate XML: http://dl-ssl.google.com/android/repository/repository-7.xml   
  11. Parse XML:    http://dl-ssl.google.com/android/repository/repository-7.xml  

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.