无法在 AMD 上运行 Android Studio 模拟器 - 错误:x86

4

我有一颗Ryzen 7 3700x的CPU(Windows 10),几天前,我成功地运行了X86的Android模拟器。但是安装Virtualbox和VmWare之后,现在我无法运行模拟器。

这里是错误信息:

*

emulator: 错误:x86仿真当前需要硬件加速!请确保Windows Hypervisor Platform(WHPX)已正确安装并可用。CPU加速状态:此机器上未安装GVM。有关在Windows上配置VM加速的更多信息: https://developer.android.com/studio/run/emulator-acceleration#vm-windows 如果您使用的是英特尔CPU:请检查BIOS中是否启用了虚拟化,并且HAXM已安装且可用。注意:如果启用了Hyper-V或Credential Guard,则模拟器将无法使用HAXM。有关如何禁用Credential Guard的信息,请参见https://github.com/intel/haxm/issues/105#issuecomment-470927735。如果您使用的是AMD CPU或需要与基于Hyper-V的应用程序(如Docker)共存,则建议使用Windows Hypervisor Platform。有关加速的一般信息: https://developer.android.com/studio/run/emulator-acceleration

*

我已经开启了Hyper-V、Windows Hypervisor Platform和Virtual Machine Platform(当然,BIOS虚拟化也是开启的),但我还能做什么?

谢谢!

3个回答

4

经过大量研究,我找到了一个适用于我的 Ryzen 系统的解决方案:

enter image description here (来源:https://github.com/intel/haxm/issues/105

打开这个 Windows 设置,不知道为什么就可以工作了。

我还发现了一个官方新的 AMD 驱动程序:https://androidstudio.googleblog.com/... 但我已经在使用这个新驱动程序。只有在我切换上述设置后才能正常工作。


2
https://github.com/intel/haxm/issues/105 中有很多事情要处理,不确定您的解决方案是否是唯一需要更改的内容。但无论如何,这是一个好提示,所以点赞。 - Christian
1
我安装了官方新版的AMD驱动程序,它正常工作!!!感谢你,伙计! - user3121134

0

https://finsterbt.com/switch-between-hyper-v-and-virtualbox-on-windows-10/

VirtualBox、VMware Workstation 和 VMware Player 不能在开启 Hyper-V 的计算机上运行。为了解决这个冲突,创建一个新的启动菜单选项,暂时禁用 Hyper-V,重新启动计算机即可。
bcdedit /copy {current} /d "Disable Hyper-V"
bcdedit /set  $GUID     hypervisorlaunchtype off
bcdedit /set  {current} hypervisorlaunchtype auto

Ryzen Android Emulator


0

我花了10个小时尝试不同的方法来让这个工作起来。有趣的是,当我最终启用了Hyper-V并重新安装了Android Studio(之前也删除了appdata文件),它又可以正常工作了。我在使用Win11 Home和Ryzen4500U。


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