使用命令行创建Android模拟器:
Android的命令工具在其安装文件目录下面的Android\sdk\tools下面。
1.列出target值.

android list targets;----列出本地上可以建立的android的各个版本。


id --23(或者android-11)  --Android3.0 --API Level11;
id --24(或者Google Inc.:Google APIs:11)  --Google APIs --API Level11;
id --25(或者Google Inc.:Google APIs:11)   --Google APIs --API Level11;


id --26(或者android-12)  --Android3.1 --API Level12;
id --27 (或者Google Inc.:Google APIs:12)  --Google APIs --API Level12;


id --28(或者android-13)  --Android3.2 --API Level13;
id --29(或者Google Inc.:Google APIs:13)   --Google APIs --API Level13;
id --30(或者Google Inc.:Google APIs:13)   --Google APIs --API Level13;
id --31(或者Google Inc.:Google  TV Android :13)   --Google APIs --API Level13;
id --32(或者Google Inc.:Google  TV Android :13)  --Google APIs --API Level13;


id --33(或者android-14)  --Android4.0 --API Level14;
id --34(或者Google Inc.:Google APIs:14)  --Google APIs --API Level14;
id --35(或者Google Inc.:Google APIs:14)  --Google APIs --API Level14;


id --36(或者android-15)  --Android4.0.3 --API Level15;
id --37(或者Google Inc.:Google APIs:15)  --Google APIs --API Level15;
id --38(或者Google Inc.:Google APIs:15)  --Google APIs --API Level15;


id --39(或者android-16)  --Android4.1.2 --API Level16;
id --40(或者Google Inc.:Google APIs:16)  --Google APIs --API Level16;
id --41(或者Google Inc.:Google APIs:16)  --Google APIs --API Level16;


id --42(或者android-17)  --Android4.2.2 --API Level17;
id --43(或者Google Inc.:Google APIs:17)  --Google APIs --API Level17;
id --44(或者Google Inc.:Google APIs:17)  --Google APIs --API Level17;




2.创建一个新的AVD.(android create avd -h -------列出命令的帮助信息)

android空格create空格avd空格-n空格myavd空格-t空格23空格-c空格500M空格 -p 空格c:\AVD空格 -s空格600x800


(完整的例子:android create avd -n testavd  -t 42 -c 70M -p c:\AVD -s 600x700 -b armeabi-v7a)
参数详细:
-t  --target 新的AVD的Target ID(必须);
-c --sdcard 指向一个共享的SD存储卡的路径或者是为新的AVD定制的新的SD存储卡的容量大小.如:-t 50M.("M"必须大写)
-p --path 新AVD将被创建的位置路径.
-n  --name新AVD的名字(必须)
-f   --force 强制创建(覆盖已存在的AVD)
-s  --skin 新AVD的皮肤.
-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.例如:android-17里面的abi有armeabi-v7a,和mips,还有x86,共三个.此时就需要用这个参数指定abi.如果只有一个abi,则不需要指定这个参数。
3.运行新创建的AVD.
emulator -avd  testavd.


运行期间不能关闭命令行,关闭命令行时模拟器也会关闭。
创建好模拟器后,在Eclipse里面的Android Virtual Device Manager里面刷新一下就可以看到创建的模拟器了。但是使用以上命令创建的模拟器没有模拟器右侧的导航键。原因还不清楚。

更多相关文章

  1. Android系统在超级终端下必会的命令大全(adb shell命令大全)
  2. Android的常用adb命令
  3. Android Studio快捷键、配置 Android Studio、cmake配置Android
  4. ANDROID模拟器不能启动
  5. [Android]Android的常用adb命令
  6. 工作环境搭建(9) - CentOS7命令行安装Android NDK
  7. [android]android命令行截图
  8. Android 调试桥 ADB命令
  9. Android 执行Shell命令

随机推荐

  1. 至2013年5月初android各个版本市场占有情
  2. android 按钮变化颜色
  3. [置顶] android软键盘的隐藏问题
  4. Android——布局的一些动态设置
  5. Android中ListView最简单的用法
  6. Google用户登录界面 Android实现
  7. Android(安卓)下保持屏幕常亮
  8. Android调用系统的发邮件方法
  9. Android(安卓)SQLite数据库相关操作
  10. Android(安卓)or java https ssl excepti