Hyper V上的Android模拟器错误

Nim*_*van 34 hyper-v android-emulator windows-10

微软最近宣布支持在Hyper V上运行Android模拟器(https://blogs.msdn.microsoft.com/visualstudio/2018/05/08/hyper-v-android-emulator-support/)

我正在尝试使用以下命令行在我的Windows 10(2018年4月更新)支持Hyper V的计算机上启动Android模拟器27.2.9.0:

> cd C:\Users\<username>\AppData\Local\Android\sdk\emulator\lib\qt\lib
> ..\..\..\emulator -avd <avd name> -feature WindowsHypervisorPlatform
Run Code Online (Sandbox Code Playgroud)

我收到以下错误消息:

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

我已将"WindowsHypervisorPlatform = on"行添加到C:\ Users\.android\advancedFeatures.ini,但这没有帮助.

我错过了什么?

Nim*_*van 54

好吧,事实证明我启用了"Hyper-V",但未启用"Windows Hypervisor平台 ".(谁知道这些是两件不同的事情!).启用后,模拟器开始工作.

在此输入图像描述

  • 即使我的Windows已更新,我也没有这个Windows Hypervisor平台.怎么了? (11认同)

Jam*_*mes 5

我做了一些事情让我的电脑正常工作.

  • 安装Visual Studio 15.8 Preview 1或更高版本
  • 在Visual Studio Preview中删除并重新安装模拟器
  • 我从android sdk管理器中的"Extras"中删除了HAXM(来自visual studio菜单).
  • advancedFeatures.ini的路径是C:\ Users\Your Username\advancedFeatures.ini来设置WindowsHypervisorPlatform = on
  • 打开或关闭"打开Windows"功能,然后选择"Hyper-V"和"Windows Hypervisor平台"复选框.(需要重启)

微软还有另一个指南:https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?tabs=vswin


Din*_*jan 5

使用最新的Android Studio,您不需要AMD上的Hyper-V。

只需启用“ Windows Hypervisor平台”(打开和关闭屏幕上的Windows功能),x86图像应自动可用

在此处输入图片说明


Tad*_*dej 5

我只需要卸载“ Hyper-V Hypervisor”,模拟器就可以开始工作了。我正在使用Windows 10(1803)。如果我安装了“ Hyper-V Hypervisor”,则仿真器将停止工作。

在此处输入图片说明