命令行 更新Android sdk

使用如下代理服务器:

大连东软信息学院镜像服务器地址:

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.
比如网络代理不通也做如此提示,真是坑。

posted @ 2015-12-28 18:53  AZ_mxl  阅读(3168)  评论(0编辑  收藏  举报