android - 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?
解决方案
经过一个小时的搜索,我发现Hyper-V
和Windows Hypervisor Platform (WHPX)
不一样。虽然您可以Hyper-V
在 Windows Server 2019 中通过 GUI 启用,但您不能对WHPX
. 除了在 BIOS 中和Hyper-V
通过 GUI 模式启用虚拟化之外,要WHPX
在 Windows Server 2019(以及可能的其他服务器版本)上启用,请在具有提升权限的 PowerShell 中运行以下命令:
Dism /Online /Enable-Feature:HypervisorPlatform
它在运行命令后工作,即使没有重新启动。
推荐阅读
- reporting-services - SSDT 2017 自定义项目项模板
- powershell - 查找计算机名称的缺失前缀
- json - 在 Codable - Swift 中使用“/”和“%”
- python - 在 python 线程中调用数据库处理程序类
- powershell - 显示将要运行的命令
- openldap - 如何在openldap中重新启用匿名登录
- jquery - AJAX - 请求正确完成但错误函数被执行
- r - R访问列表中的向量元素
- reactjs - 有没有办法充分利用 React 项目和 Meteor 项目?或者如何将 Meteor 注入到 React 项目中?
- ffi - 基于外部JS创建绑定