Visual Studio 中的 Android 模拟器无法启动,即使已安装并启用了 Hyper-V

4
我试图通过Visual Studio 2019运行Android模拟器来测试我使用Xamarin创建的应用程序。 我按照文档中概述的启用和安装Hyper-V的步骤进行操作:文档 当我尝试启动模拟设备时,会出现以下消息:

Starting emulator pixel_3_pie_9_0_api_28 ...
1>Waiting for runtime checks to complete
Emulator pixel_3_pie_9_0_api_28 cannot be started.
Runtime checks completed
1>Starting deployment to pixel_3_pie_9_0_api_28 ...
1>Starting emulator pixel_3_pie_9_0_api_28 ...
1>Launching the Android Emulator pixel_3_pie_9_0_api_28 on Hyper-V needs the Windows Hypervisor Platform installed and enabled.
1>
1>Please configure it using the Turn Windows features on or off dialog.
1>
Build has been canceled.

我不确定为什么会出现这种情况,因为我已经安装并启用了 Hyper-V。如果有任何想法,请告诉我!

相关图片: Windows 功能 命令提示符


如果这个答案有帮助,请记得在有时间的时候标记或点赞。提前感谢您的支持。*.^ - Junior Jiang
1个回答

3
如果更改了 Windows Hypervisor Platform 选项,

enter image description here

然后你需要重新启动电脑,这样它才能正常工作。

enter image description here

在创建设备时,通过点击“处理器”下拉菜单为该虚拟设备选择处理器类型。选择“x86”将提供最佳性能,因为它使模拟器可以利用硬件加速

enter image description here


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接