为什么Android模拟器报告"未知虚拟设备和QUOT;,当设备在我的用户目录? [英] Why does the Android emulator report "unknown virtual device", when the device is in my user directory?

查看:245
本文介绍了为什么Android模拟器报告"未知虚拟设备和QUOT;,当设备在我的用户目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了所有 prerequisites为Android开发。我通过Eclipse中创建一个虚拟设备,并试图运行该设备的的Hello World示例应用程序。我收到以下错误消息。

  

模拟器:错误:未知的虚拟设备名称:Android21Device
  模拟器:无法找到名为Android21Device虚拟设备

我得到同样的错误,当我尝试在命令行,并通过SDK程序启动设备。

我可以看到在

设备目录和文件
  

D:\ Users \用户安东尼\ .android \ AVD \ Android21Device.avd

解决方案

Android虚拟设备工具

在SDK管理器中的虚拟设备工具,在用户配置文件目录中创建虚拟设备......在这种情况下,辅助驱动器

  

D:\ Users \用户安东尼\ .android

不过,模拟器尝试从系统驱动器上加载的虚拟设备的图像

  

C:\ Users \用户安东尼\ .android

目录连接

有两种解决方法。首先,您可以创建一个目录硬链接(或路口)从系统推动Android文件夹复制到一个在您的用户配置文件。在Windows 7中,可以使用下面的命令

  

MKLINK /JC:\Users\anthony\.android D:\ Users \用户安东尼\ .android

Android的首页

Android的SDK管理器和模拟器<一href="http://groups.google.com/group/android-developers/browse_thread/thread/72292c1ccb2e1bb4/0e83f589301d3f83"相对=nofollow>可以使用环境变量 ANDROID_SDK_HOME 标识的位置 .android 目录。设置一个用户或环境变量

  

ANDROID_SDK_HOME ='D:\用户\安东尼

I installed all the prerequisites for Android development. I created a virtual device through Eclipse and tried to run the Hello World sample application in that device. I received the following error message.

emulator: ERROR: unknown virtual device name: 'Android21Device'
emulator: could not find virtual device named 'Android21Device'

I get the same error when I try to start the device from the command line and through the SDK program.

I can see the device directory and files at

D:\Users\anthony\.android\avd\Android21Device.avd

解决方案

Android Virtual Device Tool

The Virtual Device tool in the SDK Manager creates virtual devices in your user profile directory... in this case a secondary drive

D:\Users\anthony\.android

But, the emulator tries to load virtual device images from the system drive

C:\Users\anthony\.android

Directory Junction

There are two workarounds. First, you can create a directory hard-link (or junction) from the system drive android folder to the one in your user profile. In Windows 7, you can use the following command

mklink /J C:\Users\anthony\.android D:\Users\anthony\.android

Android Home

The Android SDK Manager and emulator can use an environment variable ANDROID_SDK_HOME to identify the location of the .android directory. Set a user or environment variable

ANDROID_SDK_HOME = 'D:\Users\anthony'

这篇关于为什么Android模拟器报告&QUOT;未知虚拟设备和QUOT;,当设备在我的用户目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆