Android:Android.bat批处理命令

E:\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.

 

                                                                    Valid

                                                                    actions

                                                                    are

                                                                    composed

                                                                    of a verb

                                                                    and an

                                                                    optional

                                                                    direct

                                                                    object:

-    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
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值