首页 > 解决方案 > 无法在 Azure VM 上使用 WHPX 运行 Android 模拟器

问题描述

我按照这里的指南:

https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?tabs=vswin

使用 Windows Hypervisor 技术运行 Android 模拟器。我目前正在研究 Azure VM D_v3 系列。在调试我的示例应用程序期间,我遇到了这个错误:

2>emulator: CPU Acceleration: DISABLED
2>emulator: CPU Acceleration status: Please disable Hyper-V before using the Android Emulator. Start a command prompt as Administrator, run 'bcdedit /set hypervisorlaunchtype off', reboot.
2>emulator: ERROR: x86_64 emulation currently requires hardware acceleration!
2>Please ensure Windows Hypervisor Platform (WHPX) is properly installed and usable.
2>CPU acceleration status: Please disable Hyper-V before using the Android Emulator. Start a command prompt as Administrator, run 'bcdedit /set hypervisorlaunchtype off', reboot.

WHPX 肯定在 Windows 功能中启用。有什么想法吗?天蓝色可以吗?

标签: androidazureandroid-emulatorhyper-v

解决方案


尝试禁用 OpenGL。它在 DSv3 VM 中为我工作。

可以通过转到 Program Files(或 Program Files x86,如果您在 64 位计算机上)\Microsoft XDE\10.0.10586.0\SKUs\Android\xdesku.xml 并删除此行来禁用它:GuestDisplayProvider="VsEmulator.xml"。 OpenGLGuestDisplay”。

如果xde下有多个版本,请确定哪个版本有SKUs\Android。

参考: https ://social.msdn.microsoft.com/Forums/en-US/d7c0bbc5-eb29-4080-8398-e55111d98c91/vs-android-emulator-cannot-boot?forum=visualstudiogeneral


推荐阅读