android - android studio avd manager 无效选项——'-enable-whpx'
问题描述
我在使用 android studio avd manager 运行任何模拟器时遇到错误:
...AppData\Local\Android\Sdk\emulator/emulator-x86.exe: invalid option -- '-enable-whpx'
- android studio 版本为 3.1.3
- 安卓模拟器版本是27.3.9
- Hyper-V 和 Windows Hypervisor Platform 在我的 Windows 10 上处于活动状态
- 并且
WindowsHypervisorPlatform = on
设置了标志...sdk\emulator\lib/advancedFeatures.ini
这是详细模式的一部分:
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?
解决方案
只需更改模拟器引擎即可解决我的问题。
根据文档-engine
,您可以使用标志指定模拟器引擎。classic
使用引擎发生上述错误。当我将引擎更改为auto
或qemu2
模拟器启动时没有错误。要更改引擎,请使用命令行转到.../sdk/emulator
目录并运行:
emulator.exe -list-avds
这将输出你的虚拟设备名称
然后运行:
emulator.exe -avd YOUR_DEVICE_NAME -engine qemu2
或者
emulator.exe -avd YOUR_DEVICE_NAME -engine auto
我希望这能帮到您。
推荐阅读
- typescript - Match "any" but not array
- wordpress - Create subdirectory on Google Cloud Wordpress Installation on Virtual Machine
- php - 我想在我的项目中的views文件夹中的一个文件中引用其中一个数据库表
- python-3.x - Splitting a dataframe (csv)
- excel - 绘制时间与角度;如何将时间转换为数字
- c# - 如何在 C# 的 SQLiteConnection 函数中编写相对路径?
- javascript - 限制平移 OpenLayers 5
- java - 打开天气地图给了我错误的请求
- backbone.js - 我可以在 MarionetteJS 中找到触发事件的主体
- java - Java:Tesseract-ocr:如何找到单词坐标?