在Azure Windows 10上运行android模拟器 [英] Running android emulator with Azure windows 10

查看:226
本文介绍了在Azure Windows 10上运行android模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在运行Windows 10 Windows版本1809的Windows的Azure虚拟机上运行android模拟器-但是我在运行android模拟器时收到以下错误消息:

I am trying to run an android emulator on an azure VM running windows, Windows 10 Pro version 1809 - But I am getting the following error message running the android emulator:

C:\ Program Files(x86)\ Android \ android-sdk \ emulator>仿真器-AVD androidemulatorapi28 仿真器:错误:x86仿真当前需要硬件加速! 请确保Windows Hypervisor平台(WHPX)已正确安装并可用. CPU加速状态:此计算机上未安装HAXM

C:\Program Files (x86)\Android\android-sdk\emulator>emulator -AVD androidemulatorapi28 emulator: ERROR: x86 emulation currently requires hardware acceleration! Please ensure the Windows Hypervisor Platform (WHPX) is properly installed and usable. CPU acceleration status: HAXM is not installed on this machine

启用了hyper-v:

The hyper-v is enabled:

以及Windows Hypervisor平台:

And Windows Hypervisor Platform as well:

VM的大小为D2_v3,并且Dv3-系列应支持嵌套虚拟化. 此处

The size of the VM is D2_v3 and Dv3 - series is supposed to support Nested Virtualization. Here, here and here are claims about it being so and that android emulator functions. And as I far as I have understood:

...是Dv3系列的一部分.

...is part of Dv3 series.

可能是什么问题?

我能够在Azure Windows VM的Hyper-V中运行Ubuntu VM.

I am able to run an Ubuntu VM in Hyper-V of the Azure Windows VM.

禁用Hyper-VWindows Hypervisor Platform,安装HAXM并运行我得到此错误:

Disabling Hyper-V and Windows Hypervisor Platform, installing HAXM and running I get this error:

根据此中篇文章的作者

According to the writer of this medium article and this StackOverflow discussion - A special custom implementation of OpenGL is necessary - because the particular azure VM size doesn't come with a GPU. However, following the steps of the article I get another type of crash - when using the Mesa3D+LLvmpip version of opengl32.dll from the authors Github repo, replacing the OpenGL file in system32 and running the android emulator:

我发现有一个 gihub回购-分发Mesa3D和LLvmpip-下载 mesa3d-19.1.3-release-mingw.exe 并运行cmd文件:

I found there was a gihub repo - distributing Mesa3D and LLvmpip - downloading mesa3d-19.1.3-release-mingw.exe and running the cmd file:

cmd中有以下消息:

There is the following message in cmd:

此部署实用程序针对没有可用GPU和任何用例的系统 硬件加速的OpenGL不可用的地方.这主要涵盖 云环境中的虚拟机和RDP连接.有可能 用于替换Microsoft Windows收件箱OpenGL 1.1软件的渲染 Mesa3D软管道,llvmpipe或SWR驱动程序的驱动程序.

This deployment utility targets systems without working GPUs and any use case where hardware-accelerated OpenGL is not available. This mainly covers virtual machines in cloud environments and RDP connections. It can be used to replace Microsoft Windows inbox OpenGL 1.1 software render driver with Mesa3D soft pipe, llvmpipe or SWR driver.

...这似乎很适合驱动程序渲染问题.

...which seems to be a fit for the driver rendering problem.

我能够通过-avd myandroidemulatorapi28消除所有cmd警告和错误,以及带有以下两个标志-gpu angle_indirect-gpu swiftshader_indirect的任何内容.然后运行set QEMU_AUDIO_DRV=none.仍然出现有关驾驶问题的GUI消息,并且有黑屏.

I was able to git rid of all cmd warnings and error by-avd myandroidemulatorapi28, and any with of following two flags -gpu angle_indirect or -gpu swiftshader_indirect. And set QEMU_AUDIO_DRV=none before running it. The GUI message about the driving issue still comes up and there is a black screen.

根据mesa-dist-win GitHub存储库的所有者的说法-当用他的机器模拟VM的状态时,他可以重现GUI消息潜水员投诉,并且仍然可以成功地运行模拟器.

According to the owner of the mesa-dist-win GitHub repo - he could reproduce the GUI message diver complaint and still run the emulator successfully - when imitating the state of a VM with his machine.

推荐答案

注意:这不是解决方案,它用于分享我尝试10-20种方法后所学到的内容的详细信息:

  • 要在Azure VDI中启用虚拟化,您需要启用Hyper-V功能.
  • 之后,您可以在任务管理器->性能"中看到虚拟化设置为true.
  • 如果没有,请尝试在命令提示符下启用它. bcdedit /set hypervisorlaunchtype auto

  • To enable virtualization in azure VDI, you need to enable Hyper-V feature.
  • After that you can see in your task manager->Performance that the virtualization is set to true.
  • If not, try enabling it from command prompt. bcdedit /set hypervisorlaunchtype auto

启用虚拟化之后.

因此,如果没有Intel HAXM,AVD将无法运行.

So, Without Intel HAXM, AVD won't run.

如果不使用Hyper-V启用虚拟化,则AVD中只会出现黑屏,并且无法启动.

Without Enabling Virtualization with Hyper-V, there will be just black screen in AVD, and it won't boot.

所以,我相信直到现在都没有解决方案,我已经在Google的stackoverflow上搜索了所有内容.如果有人找到解决方案,请在此处发布.

So, I believe there is no solution to this problem until now, I have search everything on google, stackoverflow. If someone finds a solution, please post it over here.

这篇关于在Azure Windows 10上运行android模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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