android studio avd manager 无效选项 -- '-enable-whpx'

android studio avd manager invalid option -- '-enable-whpx'

我在 运行 使用 android studio avd 管理器的任何模拟器时遇到错误:

...AppData\Local\Android\Sdk\emulator/emulator-x86.exe: invalid option -- '-enable-whpx' 

这是详细模式的一部分:

emulator: Checking whether Windows Hypervisor Platform (WHPX) is available.
emulator: Could not load library WinHvPlatform.dll
emulator: WHPX is either not available or not installed.
emulator: CPU Acceleration: working
emulator: CPU Acceleration status: HAXM version 7.2.0 (4) is installed and usable.

Windows Hypervisor Platform 已在 windows 功能中检查,WinHvPlatform.dll 出现在 C:\Windows\System32

如何启用或安装 WHPX?

我的问题通过简单地改变模拟器引擎解决了。

根据documentation,您可以使用-engine 标志指定模拟器引擎。使用 classic 引擎时会出现上述错误。当我将引擎更改为 autoqemu2 时,模拟器启动时没有错误。要更改引擎,请使用命令行和 运行:

转到 .../sdk/emulator 目录
emulator.exe -list-avds

这将输出您的虚拟设备名称

然后 运行:

emulator.exe -avd YOUR_DEVICE_NAME -engine qemu2

emulator.exe -avd YOUR_DEVICE_NAME -engine auto

希望对您有所帮助。