为什么Android模拟器报告"未知虚拟设备和QUOT;,当设备在我的用户目录?我的、设备、模拟器、目录

由网友(不毒枉为女子i)分享简介:我安装了所有 prerequisites为Android开发。我通过Eclipse中创建一个虚拟设备,并试图运行该设备的的Hello World示例应用程序。我收到以下错误消息。模拟器:错误:未知的虚拟设备名称:Android21Device模拟器:无法找到名为Android21Device虚拟设备我得到同样的错误,当...

我安装了所有 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:Usersanthony.android D: Users 用户安东尼 .android

Android的首页

Android的SDK管理器和模拟器可以使用环境变量 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.

Android模拟器

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:Usersanthony.androidavdAndroid21Device.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:Usersanthony.android

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

C:Usersanthony.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:Usersanthony.android D:Usersanthony.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:Usersanthony'

阅读全文

相关推荐

最新文章