使用命令行的Linux安装Android SDK [英] install android sdk using command line linux
问题描述
我想通过命令行来下载Android SDK中。 我接到命令,这个命令 http://stackoverflow.com/a/4569792/563306 我下载的Android SDK R18 tar文件。中提取,并在tools目录,
我试过这个命令
>的Android SDK UDPATE --no-UI
它给出了一个错误,
错误:标志--no-UI是无效的更新SDK。
另外,我看不出在--no-UI选项
的android --help
谷歌有没有改变的命令行选项
当我做了帮助,我得到这个,
安卓--help更新SDK
用法:
Android的[全局选项]动作[操作选项]
全局选项:
-v --verbose详细模式:错误,警告和信息性消息被打印出来。
在一个特定的命令-h --help帮助。
-s --silent静音模式:唯一错误是打印出来。
有效的行动是由一个动词和一个可选的直接对象:
- 列表:列出现有目标或虚拟设备。
- 列表AVD:现有的Android虚拟设备列表。
- 目标列表:列出现有的目标。
- 创建AVD:创建一个新的Android虚拟设备。
- 招AVD:移动或重命名一个Android虚拟设备。
- 删除AVD:删除一个Android虚拟设备。
- 更新AVD:更新的Android虚拟设备来匹配新的SDK的文件夹。
- 创建工程:创建一个新的Android项目。
- 更新项目:更新的Android项目(必须有一个AndroidManifest.xml中)。
- 创建测试项目:创建一个新的Android测试项目。
- 更新测试项目:更新一个Android测试项目(必须有一个AndroidManifest.xml中)。
- 创建LIB-项目:创建一个新的Android库项目。
- 更新LIB-项目:更新一个Android库项目(必须有一个AndroidManifest.xml中)。
- 更新ADB:亚洲开发银行的更新,支持SDK中的附加声明的USB设备。
- 更新SDK:通过提出新的平台(如果可用)安装更新的SDK。
操作列表:
列出现有目标或虚拟设备。
选项:
没有选择
操作列表AVD:
现有的Android虚拟设备列表。
选项:
没有选择
操作列表目标:
列出现有目标。
选项:
没有选择
行动创建AVD:
创建一个新的Android虚拟设备。
选项:
-c --sdcard路径共享SD卡的图像,或为新的AVD一个新的SD卡的大小
新的AVD -t --target目标ID [要求]
新的AVD -N --name名称[要求]
-p目录的--path位置路径,其中新的AVD将被创建
-f --force强制创建(覆盖现有的AVD)
-s新的AVD --skin皮肤
操作移动AVD:
移动或重命名一个Android虚拟设备。
选项:
目录中,其中移动AVD -p --path新位置路径
在AVD的-N --name名称移动或重命名[要求]
-r --rename的AVD的新名字重新命名
操作删除AVD:
删除一个Android虚拟设备。
选项:
在AVD的-N --name名称删除[要求]
行动更新AVD:
更新的Android虚拟设备来匹配新的SDK的文件夹。
选项:
在AVD的-N --name名称更新[要求]
行动创建项目:
创建一个新的Android项目。
选项:
-n --name项目名称
-t --target新项目的目标ID [要求]
-p新项目--path位置路径[要求]
-k --package包名称[要求]
-a --activity活动名称[要求]
行动更新工程:
更新的Android项目(必须有一个AndroidManifest.xml中)。
选项:
-p项目--path位置路径[要求]
添加一个Android库的-l --library位置路径,相对于主项目
-n --name项目名称
-t --target目标ID为项目设置
-s --subprojects还更新子文件夹,如测试项目中的任何项目。
行动创建测试项目:
创建一个新的Android测试项目。
选项:
-p新项目--path位置路径[要求]
该项目的-m - 主位置路径来测试,相对于新项目[要求]
-n --name项目名称
行动更新测试项目:
更新一个Android测试项目(必须有一个AndroidManifest.xml中)。
选项:
该项目的-m - 主位置路径来测试,相对于新项目[要求]
-p项目--path位置路径[要求]
行动创建LIB-工程:
创建一个新的Android库项目。
选项:
-n --name项目名称
-p新项目--path位置路径[要求]
-t --target新项目的目标ID [要求]
-k --package包名称[要求]
行动更新LIB项目:
更新一个Android库项目(必须有一个AndroidManifest.xml中)。
选项:
-p项目--path位置路径[要求]
添加一个Android库的-l --library位置路径,相对于主项目
-t --target目标ID为项目设置
行动更新亚行:
更新亚行支持SDK中的附加声明的USB设备。
选项:
没有选择
行动更新SDK:
更新的SDK通过提出新的平台,如果可供安装。
选项:
没有选择
它为我工作正常。尝试没有 - 没有UI
标记,看看是否能工程。如果没有,什么是错误信息,你得到什么呢?
编辑:
您可能有你的 PATH
配置不正确。您需要执行当前文件夹中的可执行文件,如下所示:
$ ./android更新SDK --no-UI
I want to download android sdk through command line. I got this command from command http://stackoverflow.com/a/4569792/563306 I downloaded Android SDK r18 tar file. extracted it and in tools directory,
I tried this command
>android udpate sdk --no-ui
It gives an error,
Error: Flag '--no-ui' is not valid for 'update sdk'.
Also, I don't see the --no-ui options in the
android --help
Did Google change the command line options
When I did a help, I get this,
android --help update sdk
Usage:
android [global options] action [action options]
Global options:
-v --verbose Verbose mode: errors, warnings and informational messages are printed.
-h --help Help on a specific command.
-s --silent Silent mode: only errors are printed out.
Valid actions are composed of a verb and an optional direct object:
- list : Lists existing targets or virtual devices.
- list avd : Lists existing Android Virtual Devices.
- list target : Lists existing targets.
- create avd : Creates a new Android Virtual Device.
- move avd : Moves or renames an Android Virtual Device.
- delete avd : Deletes an Android Virtual Device.
- update avd : Updates an Android Virtual Device to match the folders of a new SDK.
- create project : Creates a new Android Project.
- update project : Updates an Android Project (must have an AndroidManifest.xml).
- create test-project: Creates a new Android Test Project.
- update test-project: Updates an Android Test Project (must have an AndroidManifest.xml).
- create lib-project : Creates a new Android Library Project.
- update lib-project : Updates an Android Library Project (must have an AndroidManifest.xml).
- update adb : Updates adb to support the USB devices declared in the SDK add-ons.
- update sdk : Updates the SDK by suggesting new platforms to install if available.
Action "list ":
Lists existing targets or virtual devices.
Options:
No options
Action "list avd":
Lists existing Android Virtual Devices.
Options:
No options
Action "list target":
Lists existing targets.
Options:
No options
Action "create avd":
Creates a new Android Virtual Device.
Options:
-c --sdcard Path to a shared SD card image, or size of a new sdcard for the new AVD
-t --target Target id of the new AVD [required]
-n --name Name of the new AVD [required]
-p --path Location path of the directory where the new AVD will be created
-f --force Force creation (override an existing AVD)
-s --skin Skin of the new AVD
Action "move avd":
Moves or renames an Android Virtual Device.
Options:
-p --path New location path of the directory where to move the AVD
-n --name Name of the AVD to move or rename [required]
-r --rename New name of the AVD to rename
Action "delete avd":
Deletes an Android Virtual Device.
Options:
-n --name Name of the AVD to delete [required]
Action "update avd":
Updates an Android Virtual Device to match the folders of a new SDK.
Options:
-n --name Name of the AVD to update [required]
Action "create project":
Creates a new Android Project.
Options:
-n --name Project name
-t --target Target id of the new project [required]
-p --path Location path of new project [required]
-k --package Package name [required]
-a --activity Activity name [required]
Action "update project":
Updates an Android Project (must have an AndroidManifest.xml).
Options:
-p --path Location path of the project [required]
-l --library Location path of an Android Library to add, relative to the main project
-n --name Project name
-t --target Target id to set for the project
-s --subprojects Also update any projects in sub-folders, such as test projects.
Action "create test-project":
Creates a new Android Test Project.
Options:
-p --path Location path of new project [required]
-m --main Location path of the project to test, relative to the new project [required]
-n --name Project name
Action "update test-project":
Updates an Android Test Project (must have an AndroidManifest.xml).
Options:
-m --main Location path of the project to test, relative to the new project [required]
-p --path Location path of the project [required]
Action "create lib-project":
Creates a new Android Library Project.
Options:
-n --name Project name
-p --path Location path of new project [required]
-t --target Target id of the new project [required]
-k --package Package name [required]
Action "update lib-project":
Updates an Android Library Project (must have an AndroidManifest.xml).
Options:
-p --path Location path of the project [required]
-l --library Location path of an Android Library to add, relative to the main project
-t --target Target id to set for the project
Action "update adb":
Updates adb to support the USB devices declared in the SDK add-ons.
Options:
No options
Action "update sdk":
Updates the SDK by suggesting new platforms to install if available.
Options:
No options
It works fine for me. Try it without the --no-ui
flag and see if that works. If not, what is the error message you get?
Edit:
You probably have your PATH
configured incorrectly. You need to execute the "current folder executable" as follows:
$ ./android update sdk --no-ui
这篇关于使用命令行的Linux安装Android SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!