如何在命令行上安装Android SDK构建工具? [英] How to install Android SDK Build Tools on the command line?
问题描述
我想设置命令行Android的开发环境,并遇到了以下问题:
I want to setup the Android dev environment from command line, and encounter the following issue:
wget http://dl.google.com/android/android-sdk_r22.0.5-linux.tgz
提取后的文件,运行
after extract the file, run
tools/android update sdk --no-ui
不过,实在是太慢了上运行
However, it is too slow on running
Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml
其结果是,没有在文件夹中积聚的工具,我想要的是AAPT和apkbuilder,因为我想建的命令行APK没有蚂蚁。
The result is that nothing in folder build-tools, and I want is aapt and apkbuilder, since I want to build apk from command line without ant.
谁能帮助我?先谢谢了。
Can anyone help me? Thanks in advance.
推荐答案
在默认情况下,在命令行的SDK管理器不包括在列表中的构建工具。他们是在过时的范畴。要查看所有可用的下载可用,使用
By default, the SDK Manager from the command line does not include the build tools in the list. They're in the "obsolete" category. To see all available downloads available, use
android list sdk --all
然后拿到包中的一个命令行的列表,请使用:
And then to get one of the packages in that list from the command line, use:
android update sdk -u -a -t <package no.>
在哪里-u代表--no-UI,-a代表--all和-t表示--filter。
Where -u stands for --no-ui, -a stands for --all and -t stands for --filter.
如果您需要安装多个软件包做:
If you need to install multiple packages do:
android update sdk -u -a -t 1,2,3,4,..,n
其中1,2,...,n是用list命令上面
Where 1,2,..,n is the package number listed with the list command above
这篇关于如何在命令行上安装Android SDK构建工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!