创建 Android虚拟设备(AVD)

Failed to find an AVD compatible with target 'Android 1.5'. Launch aborted.
初次运行Android应用程序,在控制台一般都会出现上面所示的提示信息,失败的原因是缺少AVD(Android Virtual Device)。
Andriod developers网站的Dev Guide上详细介绍了创建一个AVD的方法:
参考[http://developer.android.com/guide/developing/eclipse-adt.html#CreatingAnAvd]

Creating an AVD
创建一个Android虚拟设备

To avoid some explanation that's beyond the scope of this document, here's the basic procedure to create an AVD:
为了避免超出本文档范围,下面是创建一个Android虚拟设备的基本过程:


   1. Open a command-line (e.g.,"Command Prompt" application on Windows, or "Terminal" on Mac/Linux) and navigate to your SDK package's tools/ directory.
   1.启动一个命令行窗口并导航到SDK的tools子目录。

   2. First, you need to select a Deployment Target. To view available targets, execute:
   2. 首先,你需要选择一个部署目标。显示可获得的目标,请执行:

      android list targets

      This will output a list of available Android targets, such as:
      控制台将输出当前可用的Android目标列表,例如:

      id:1
          Name: Android 1.1
          Type: platform
          API level: 2
          Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
      id:2
          Name: Android 1.5
          Type: platform
          API level: 3
          Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P

      Find the target that matches the Android platform upon which you'd like to run your application. Note the integer value of the id — you'll use this in the next step.
      找到与你的应用程序依赖的Android平台对应的目标。记住对应id的整型值—下一步将会用到它。
   3. Create a new AVD using your selected Deployment Target. Execute:
   3. 创建一个适用于你选择的部署目标的新的AVD.执行以下命令:

      android create avd --name <your_avd_name> --target <targetID>

   4. Next, you'll be asked whether you'd like to create a custom hardware profile. If you respond "yes," you'll be presented with a series of prompts to define various aspects of the device hardware (leave entries blank to use default values, which are shown in brackets). Otherwise, press return to use all default values ("no" is the default).
   4. 接下来,将询问你是否将要创建一个自定义的硬件设备。如果你选择“yes”,接下来将会出现一系列提示,定义硬件设备的各个方面(使用entries blank的默认值, 默认值是括号中的值)。否则,通过回车选择所有默认值(“no”是默认值)。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值