首页 > 解决方案 > How to enable hardware acceleration for Android Emulator in Windows Server 2019?

问题描述

I have an AMD CPU, with Windows Server 2019 (dont ask why), where I enabled Hyper-V. However, in my (stable channel) Android Studio, it still says

Unfortunately, your computer does not support hardware accelerated virtualization. Here are some of your options:

1) Use a physical device for testing

2) Develop on a Windows/OSX computer with an Intel processor that supports VT-x and NX

3) Develop on a Linux computer that supports VT-x or SVM

4) Use an Android Virtual Device based on an ARM system image (This is 10x slower than hardware accelerated virtualization)

Is it that the Hyper-V enabled emulator option only available in the beta channel of Android Studio? How to enable hardware acceleration for Android Emulator in Windows Server 2019?

标签: androidandroid-studioandroid-emulator

解决方案


经过一个小时的搜索,我发现Hyper-VWindows Hypervisor Platform (WHPX)不一样。虽然您可以Hyper-V在 Windows Server 2019 中通过 GUI 启用,但您不能对WHPX. 除了在 BIOS 中和Hyper-V通过 GUI 模式启用虚拟化之外,要WHPX在 Windows Server 2019(以及可能的其他服务器版本)上启用,请在具有提升权限的 PowerShell 中运行以下命令:

Dism /Online /Enable-Feature:HypervisorPlatform

它在运行命令后工作,即使没有重新启动。


推荐阅读