使用如下代理服務器:
大連東軟信息學院鏡像服務器地址:
http://mirrors.neusoft.edu.cn 端口:80
北京化工大學鏡像服務器地址:
IPv4: http://ubuntu.buct.edu.cn/ 端口:80
IPv4: http://ubuntu.buct.cn/ 端口:80
IPv6: http://ubuntu.buct6.edu.cn/ 端口:80
上海GDG鏡像服務器地址:
http://sdk.gdgshanghai.com 端口:8000
想查看列表
/opt/android-sdk-linux/tools$ ./android list sdk --proxy-host sdk.gdgshanghai.com --proxy-port 8000 -s
然后再使用 update sdk 取下來,比如去 extra-android-support 就輸入如下內容:
/opt/android-sdk-linux/tools$ ./android update sdk --proxy-host sdk.gdgshanghai.com --proxy-port 8000 -s -u -t extra-android-support
或者輸入
/opt/android-sdk-linux/tools$ ./android update sdk --proxy-host sdk.gdgshanghai.com --proxy-port 8000 -s -u -t 35
如果發現更新后總是提示 There is nothing to install or update.
則返回到上一級目錄,刪除 temp 文件夾,然后再進入tools目錄執行上面命令。
如果還不行,檢查 home 目錄的.android目錄權限是否可寫。
如果還不行,再檢查代理服務器端口和地址,以及是否使用了 -s 參數強制用 http。
android 程序遇到以上錯誤不會提示錯誤,只是提示There is nothing to install or update.
比如網絡代理不通也做如此提示,真是坑。