android AVDs mksdcard dx工具介绍

[quote][/quote]android 工具是一个脚本文件,用于创建,管理AVDs (Android Virtual Devices).

AVD 由四部分组成:
1.一个硬件配置:
定义设备硬件.
比如:camera ,键盘, 内存大小等.

2.系统图片:

3.其它:
皮肤,屏幕大小,外表,SD卡

4.专用的存储区:
存储设备用户数据(应用,设置等),模拟SD卡.


创建AVD:
[quote]
android create avd -n <name> -t <targetID> [-<option> <value>] ...
[/quote]

查看可用目标:
[quote]
D:\WINDOWS\system32>android list targets
Available Android targets:
id: 1
Name: Android 1.5
Type: Platform
API level: 3
Revision: 1
Skins: QVGA-P, QVGA-L, HVGA-P, HVGA (default), HVGA-L
id: 2
Name: Android 1.6
Type: Platform
API level: 4
Revision: 1
Skins: WVGA800, QVGA, WVGA854, HVGA (default)
id: 3
Name: Google APIs
Type: Add-On
Vendor: Google Inc.
Revision: 3
Description: Android + Google APIs
Based on Android 1.5 (API level 3)
Libraries:
* com.google.android.maps (maps.jar)
API for Google Maps
Skins: QVGA-P, HVGA-L, HVGA (default), QVGA-L, HVGA-P
id: 4
Name: Google APIs
Type: Add-On
Vendor: Google Inc.
Revision: 1
Description: Android + Google APIs
Based on Android 1.6 (API level 4)
Libraries:
* com.google.android.maps (maps.jar)
API for Google Maps
Skins: WVGA854, HVGA (default), QVGA, WVGA800

[/quote]

选择目标:
比如:选择目标id:2.
[quote]
android create avd -n my_android1.5 -t 2
[/quote]


更多设置参照ADT插件配置吧.


[b]mksdcard[/b]
创建FAT32磁盘镜象,让模拟器模拟SD卡.

用法:
[quote]

mksdcard [-l label] <size>[K|M] <file>
[/quote]

[quote]D:\WINDOWS\system32>mksdcard -l "tl" 1024M c:\sd\sd1[/quote]

-l:指定卷标签
size:大小
file:要创建的镜象文件

加载SD卡:
[quote]
emulator -sdcard <file>
[/quote]

[quote]D:\WINDOWS\system32>emulator -sdcard c:\sd\sd1
emulator: emulator window was out of view and was recentred[/quote]


[b]dx[/b]
为了在Androd environment中运行,dx 工具把.class 文件生成字节码(.dex).
它也可以dump 这个类为人可读的格式,并运行一个单元测试.

用法:
[quote]
D:\WINDOWS\system32>dx -help
usage:
dx --dex [--debug] [--verbose] [--positions=<style>] [--no-locals]
[--no-optimize] [--statistics] [--[no-]optimize-list=<file>] [--no-strict]
[--keep-classes] [--output=<file>] [--dump-to=<file>] [--dump-width=<n>]
[--dump-method=<name>[*]] [--verbose-dump] [--no-files] [--core-library]
[<file>.class | <file>.{zip,jar,apk} | <directory>] ...
Convert a set of classfiles into a dex file, optionally embedded in a
jar/zip. Output name must end with one of: .dex .jar .zip .apk. Positions
options: none, important, lines.
dx --annotool --annotation=<class> [--element=<element types>]
[--print=<print types>]
dx --dump [--debug] [--strict] [--bytes] [--basic-blocks | --rop-blocks]
[--width=<n>] [<file>.class | <file>.txt] ...
Dump classfiles in a human-oriented format.
dx --junit [-wait] <TestClass>
Run the indicated unit test.
dx -J<option> ... <arguments, in one of the above forms>
Pass VM-specific options to the virtual machine that runs dx.
dx --version
版本
dx --help
帮助
[/quote]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值