android

android
android is an important development tool that lets you:

Create, delete, and view Android Virtual Devices (AVDs). See Managing AVDs from the Command Line.
Create and update Android projects. See Managing Projects from the Command Line.
Update your Android SDK with new platforms, add-ons, and documentation. See 扫描SDK.
If you are using Eclipse, the android tool’s features are integrated into ADT, so you should not need to use this tool directly.
Note: The documentation of options below is not exhaustive and may be out of date. For the most current list of options, execute android --help.

Syntax
android [global options] action [action options]
Global Options
-s
Silent mode: only errors are printed out
-h
Usage help
-v
Verbose mode: errors, warnings and informational messages are printed.
AVD actions and options
Action Option Description Comments
avd None Launch the AVD Manager
sdk None Launch the Android SDK Manager
create avd -n The name for the AVD. Required
-t Target ID of the system image to use with the new AVD. To obtain a list of available targets, use android list targets Required
-c |[K|M] The path to the SD card image to use with this AVD or the size of a new SD card image to create for this AVD. For example, -c path/to/sdcard or -c 1000M.
-f Force creation of the AVD
-p Path to the location at which to create the directory for this AVD’s files.
-s |- The skin to use for this AVD, identified by name or dimensions. The android tool scans for a matching skin by name or dimension in the skins/ directory of the target referenced in the -t argument. For example, -s HVGA-L
delete avd -n The name of the AVD to delete Required
move avd -n The name of the AVD to move Required
-p Path to the location at which to create the directory for this AVD’s files.
-r New name of the AVD if you want to rename it
update avd -n The name of the AVD to move Required
Project actions and options
Action Option Description Comments
create project -n The name for the project Required
-t Target ID of the system image to use with the new AVD. To obtain a list of available targets, use android list targets Required
-k |[K|M] Package namespace Required
-a Name for the default Activity class Required
-p Location of your project directory Required
update project -n The name of the project to update
-p Location path of the project Required
-l Location path of an Android Library to add, relative to the main project
-s Update any projects in subfolders such as test projects
-t Target id to set for the project
create-test-project -n The name of the project
-p Location path of the project Required
-m The name of the project Required
update-test-project -p Location path of the project to test, relative to the new project Required
-m The main class of the project to test Required
create-lib-project -k (Required) Package name of the library project Required
-p Location path of the project Required
-t Target ID of the library project Required
-n The name of the project Required
update-lib-project -p Location path of the project Required
-l Location path of an Android Library to add, relative to the main project
-t Target ID of the library project
Update actions
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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值