是否可以在VMWare上运行Android设备仿真器(通过Android Studio 2)? [英] Is it possible to run Android Device Emulator (via Android Studio 2) on VMWare?

查看:351
本文介绍了是否可以在VMWare上运行Android设备仿真器(通过Android Studio 2)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在运行Android Studio 1.5.1,并在Windows 2012 R2的WMWare副本上进行开发,并且一切正常.我已经能够毫无问题地运行设备模拟器并启动在AVD中运行的各种版本的Android.

I have been running Android Studio 1.5.1 doing development on a WMWare copy of Windows 2012 R2 and everything works fine. I've been able to run the device emulator with no problems and start various versions of Android running in AVD.

Android Studio 2.x更改 我最近安装了Android Studio 2.0(具体版本请参见下图).

Android Studio 2.x Change I recently installed Android Studio 2.0 (see image below for exact version).

现在,当我尝试运行仿真器时,什么都没有发生. 好吧,实际上,当我尝试启动设备时,确实在Studio的状态栏中看到了一条消息,但是随后该消息消失了,此后什么也没有发生.

Now when I attempt to run the emulator nothing happens. Well, actually I do see a message in the status bar of Studio when I attempt to start the device, but then that message disappears and nothing happens after that.

有警告我需要关闭Hyper-V(请参见下图),但是我不认为这是可能的,因为这是一台VM.

There is a warning that I need to turn off Hyper-V (see image below), but I don't believe that is possible since this is a VM.

不再可能?

是否无法再在VM上运行仿真器?

Is it not possible to run the emulator on the VM any more?

推荐答案

我刚刚在Windows 2008 R2 VM(运行VMWare)上安装了Android Studio 2.1,很高兴地报告它可以在VM上运行基于ARM的AVD(Android虚拟设备).

I just installed Android Studio 2.1 on my Windows 2008 R2 VM (running VMWare) and I'm happy to report that it is possible to run ARM based AVD (Android Virtual Devices) on the VM.

在VMWare上运行基于Arm的虚拟设备的步骤

  1. 转到您已安装Android SDK的位置(在我的情况下为%appdata%\ Android2 \ SDK \
  2. 如果在正确的位置,您应该会看到目录结构和目录,如下面的第一张图片所示.

  1. 双击以启动AVD.exe.

您将看到下图所示的窗口

You will see a window like the one in the image below

  1. 仔细观察并注意到它正在运行ARM(armeabi-v71)映像.当您下载映像时,您必须下载基于ARM的映像. (没有x86映像将在VM上运行).

  1. Take a close look and notice that this is running an ARM(armeabi-v71) image. When you download images you have to download ARM-based images. (no x86 images will work on VM).

而且,您无法从从Android Studio 2.x启动的AVD启动这些图像

Also, you cannot start these images from AVD that launches from Android Studio 2.x

确保已将名为ANDROID_SDK_HOME的环境变量设置为与AVD管理器顶部的环境变量相似的路径(如图所示).

Make sure you have an environment variable named ANDROID_SDK_HOME set to path which is similar to the one at the top of the AVD manager (in image).

完成所有这些操作并在VMWare VM上启动基于ARM的映像后,它会警告您使用HAXM更快,但是至少该映像将运行.

Once you do all of this and start an ARM-based image on a VMWare VM it will warn you that it is faster with HAXM but at least the image will run.

最后,您可以查看是否尝试从Android Studio中的AVD Manager启动虚拟设备,然后它会警告您需要关闭Hyper-V.当然,您不能在VM上关闭Hyper-V.

Finally, you can see if you attempt to launch your Virtual Device from the AVD Manager in Android Studio then it will warn you that Hyper-V needs to be turned off. Of course you cannot turn Hyper-V off on a VM.

编辑-运行Android 7 ARM映像

@mcflysoft问有关运行android 7 ARM映像的问题.最初我认为它没有用,但是如果您打开SDK管理器并安装下图所示的确切ARM OS映像,它将在Windows VM上运行:

@mcflysoft asked about running an android 7 ARM image. At first I didn't think it worked, but if you open up your SDK manager and install the exact ARM OS image shown in the following picture, it will run on a Windows VM:

包含Google API的ARM映像

我尝试安装包含Google API的ARM映像,并且该映像永远不会启动.我在c:\> adb shell logcat中看到了记录的失败.

I tried installing the ARM image that contained the Google APIs and that one would not ever start. There were failures logged which I could see in c:\> adb shell logcat.

当心:它真的很慢

但是,运行Android 7的速度似乎非常慢,而且我看不到网络浏览器. 不确定它对您有多大帮助,但是您可以使它正常工作. 祝你好运.

However, running Android 7 seems extremely slow and I don't see a web browser. Not sure how helpful it may be to you, but you can get it working. Good luck.

这篇关于是否可以在VMWare上运行Android设备仿真器(通过Android Studio 2)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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