Android.bat 常用命令介绍

来源:互联网 发布:dnf网络冲突和别人 编辑:程序博客网 时间:2024/06/03 19:22
:\Android\sdk\tools>android --help

 

       Usage:

       android [global options] action [action options]

       Global options:

  -h --help       : Help on a specific command.

    -v --verbose    : Verbose mode, shows errors, warnings and all messages.

       --clear-cache: Clear the SDK Manager repository manifest cache.

           -s --silent     : Silent mode, shows errors only.

 

-    sdk              : Displays the SDK Manager window.  SDK管理界面

-    avd              : Displays the AVD Manager window. AVD管理界面

-   list                 : Lists existing targets or virtual devices 列出AVD和手机设备(已经连接上,并开启了adb服务的)

-   list avd          : Lists existing Android Virtual Devices. 列出AVD

-   list target       : Lists existing targets. 列出手机设备

-   list sdk          : Lists remote SDK repository 获取SDK的代码库信息

- create avd      : Creates a new Android Virtual Device. 创建AVD

- move avd       : Moves or renames an Android Virtual Device. 移动或重命名AVD

- delete avd      : Deletes an Android Virtual Device. 删除AVD

- update avd     : Updates an Android Virtual Device to match the folders of a new SDK. 更新AVD信息,如文件配置目录

- create project      : Creates a new Android project.

                        创建android项目

- update project      : Updates an Android project (must already have an

                        AndroidManifest.xml).

- create test-project : Creates a new Android project for a test package.

- update test-project : Updates the Android project for a test package (must already have an AndroidManifest.xml).

- create lib-project  : Creates a new Android library project. 创建Lib类型的Android项目

- update lib-project  : Updates an Android library project (must already have an AndroidManifest.xml).

- create uitest-project: Creates a new UI test project.

- update adb          : Updates adb to support the USB devices declared in the SDK add-ons. 更新ADB,以支持USB设备

- update sdk          : Updates the SDK by suggesting new platforms to install if available.

 

想获取具体命令更详细的参数,如创建AVD的详细参数:

输入 android create avd

 

E:\Android\sdk\tools>android create avd

Error: The parameters --name, --target must be defined for action 'create avd'

 

       Usage:

       android [global options] create avd [action options]

       Global options:

  -h --help       : Help on a specific command.

  -v --verbose    : Verbose mode, shows errors, warnings and all messages.

     --clear-cache: Clear the SDK Manager repository manifest cache.

  -s --silent     : Silent mode, shows errors only.

 

                     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.

创建SDCARD-c后面是SDCARD的本地路径或者大小,如果是路径,则指向一个sdcard.img,否则在默认位置产生一个新指定大小(MB)sdcard.img

当前目录下有个mksdcard.exe可以创建sdcard文件

  -n --name    : Name of the new AVD. [required]  AVD的命名【必要】

  -a --snapshot: Place a snapshots file in the AVD, to enable persistence 快照功能,当下次重新启动AVD时可以直接加载退出时的状态和应用

  -p --path    : Directory where the new AVD will be created. AVD文件所在目录

  -f --force   : Forces creation (overwrites an existing AVD) 覆盖已有AVD文件

  -s --skin    : Skin for the new AVD. 指定skin,就是分辨率参数

  -t --target  : Target ID of the new AVD. [required] 就是API Level【必要】

  -b --abi     : The ABI to use for the AVD. The default is to auto-select the ABI if the platform has only one ABI for its system images. 硬件配置,system.img,如指定机型HTCsystem.img

示例:android create avd -n AVD23 -t 10 -s WVGA –c 512

创建一个Android 2.3.3AVD,支持SDCARD,大小512MB,屏幕分辨率WVGA,命名为AVD23

提示:可以通过android avd调出avd  GUI编辑界面来熟悉每个命令对应的参数。

0 0
原创粉丝点击