命令行 更新Android sdk

使用以下代理服務器:linux

大連東軟信息學院鏡像服務器地址:android

http://mirrors.neusoft.edu.cn 端口:80ubuntu

北京化工大學鏡像服務器地址:服務器

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 端口:8000android-sdk


想查看列表
/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 35date

 

 

若是發現更新後老是提示 There is nothing to install or update.
則返回到上一級目錄,刪除 temp 文件夾,而後再進入tools目錄執行上面命令。
若是還不行,檢查 home 目錄的.android目錄權限是否可寫。
若是還不行,再檢查代理服務器端口和地址,以及是否使用了 -s 參數強制用 http。sdk

android 程序遇到以上錯誤不會提示錯誤,只是提示There is nothing to install or update.好比網絡代理不通也作如此提示,真是坑。

相關文章
相關標籤/搜索