2015-04-27 112 views
1

我根據SDK的Readme.txt運行下面的命令放置在SDK中:在Ubuntu上下載Android SDK中PC

$tools/android update sdk --no-ui 

,但我得到了以下錯誤:

刷新來源:

Fetching https://dl.google.com/android/repository/addons_list-2.xml 
    Failed to fetch URL https://dl.google.com/android/repository/addons_list-2.xml, reason: Unknown Host dl.google.com 
    Fetched Add-ons List successfully 
    Refresh Sources 
    Fetching URL: https://dl.google.com/android/repository/repository-10.xml 
    Failed to fetch URL https://dl.google.com/android/repository/repository-10.xml, reason: IO Unknown Host dl.google.com 
Refresh Sources: 
    Fetching URL: https://dl.google.com/android/repository/repository-10.xml 
    Failed to fetch URL https://dl.google.com/android/repository/repository-10.xml, reason: IO Unknown Host dl.google.com 
Refresh Sources: 
    Fetching URL: https://dl.google.com/android/repository/repository-10.xml 
    Failed to fetch URL https://dl.google.com/android/repository/repository-10.xml, reason: IO Unknown Host dl.google.com 
Refresh Sources: 
    Fetching URL: https://dl.google.com/android/repository/repository-10.xml 
    Failed to fetch URL https://dl.google.com/android/repository/repository-10.xml, reason: IO Unknown Host dl.google.com 

如果我嘗試使用Android-Studio-> SDK Manager做同樣的事情,我會在消息框中得到相同的錯誤。

這是由於沒有代理設置?

回答

0

它聽起來像一個代理或其他網絡問題。嘗試用ping dl.google.com ping該地址。你應該回到這樣的東西:

PING dl.l.google.com (216.58.219.110) 56(84) bytes of data. 
64 bytes from mia07s25-in-f14.1e100.net (216.58.219.110): icmp_req=1 ttl=47 time=35.2 ms 
64 bytes from mia07s25-in-f14.1e100.net (216.58.219.110): icmp_req=2 ttl=47 time=29.2 ms 

直到你取消命令與Control-C。

+0

我得到:ping:未知主機dl.google.com,奇怪:瀏覽器中的dl.google.com將我引向http://www.google.com/chrome/ :)! – Raulp

+0

您絕對不應該在dl.google.com上收到未知的主機錯誤,但預期瀏覽器中的行爲。谷歌顯然假設你試圖無意中瀏覽該頁面並重新映射它。如果您訪問任何Google網站,那麼您的網絡至少部分可以正常工作。 – scottt

+0

您是從代理之後發佈的還是沒有代理髮布的ping測試結果? – Raulp