Android Studio Emulator 无法在使用 WHPX 的 Windows 11 上运行 [英] Android Studio Emulator is not working on Windows 11 using WHPX

查看:102
本文介绍了Android Studio Emulator 无法在使用 WHPX 的 Windows 11 上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的系统上有 Windows 11.
系统规格:

I have Windows 11 on my system.
The system specifiction:

  • 版本:Windows 11 Home Single Language
  • 更新:21H2
  • 安装日期: 06- 07- 2021
  • 操作系统版本:22000.65
  • 体验:Windows 功能体验包 421.17400.45.3

我全新安装了 Android Studio.现在我想在没有英特尔 HAXM 的情况下运行模拟器,因为我想在 wsl2 旁边运行它.

I have fresh installed Android Studio. Now I want to run the emulator without Intel HAXM as I want to run it alongside wsl2.

所以在我的可选功能中,这两个功能是启用的

So in my optional feature, these two features are enabled

  1. Windows HyperVisor 平台
  2. 虚拟机平台

但在运行模拟器时出现此错误:

But while running the emulator I'm getting this error:

❯ .emulator.exe -avd Pixel_3a_API_30
emulator: Android emulator version 30.7.5.0 (build_id 7491168) (CL:N/A)
handleCpuAcceleration: feature check for hvf
added library vulkan-1.dll
C:Users....AppDataLocalAndroidSdkemulatorqemuwindows-x86_64qemu-system-x86_64.exe: WHPX: Failed to setup partition, hr=c0350005
C:Users....AppDataLocalAndroidSdkemulatorqemuwindows-x86_64qemu-system-x86_64.exe: failed to initialize WHPX: Invalid argument

任何人都得到了建议,如何解决这个问题.

Anyone got suggestions, how to resolve this issue.

推荐答案

最终更新:

Георги Ангелов 所述:

最新版本的 Android Emulator - 31.1.2 正在解决此问题.通过 SDK 管理器进行更新.2021 年 11 月 11 日发布.

The latest version of Android Emulator - 31.1.2 is fixing the issue. Update through SDK Manager. Released 11/11/2021.

Mark Wood-Patrick 回答中所述,模拟器尚未更新,但您可以下载新的带有修复程序的模拟器二进制文件!

As stated in Mark Wood-Patrick answer, the emulator hasn't been updated yet but you can download the new emulator binaries with the fix!

windows:https://dl.google.com/android/repository/emulator-windows_x64-7869535.zip
linux:https://dl.google.com/android/repository/模拟器-linux_x64-7869535.zip
macOS:https://dl.google.com/android/repository/模拟器-darwin_x64-7869535.zip


WHPX 目前无法与 Windows 11 一起使用,我会在修复后更新此答案.


WHPX as of now is not working with Windows 11, I will update this answer when it gets fixed.

要禁用 Hyper-V,您必须按照以下步骤操作:

To disable Hyper-V you must follow these steps:

  1. 打开开启或关闭Windows功能.
  2. 取消选中Hyper-VWindows Hypervisor平台(可能需要取消选中Windows Sandbox).
  3. 打开 Android Studio 和 SDK 管理器.
  4. 在 SDK 工具中,安装 Android Emulator Hypervisor Driver for AMD Processors(安装程序).
  1. Open Turn Windows features on or off.
  2. Uncheck Hyper-V and Windows Hypervisor platform (it may be required to uncheck Windows Sandbox).
  3. Open Android Studio and SDK Manager.
  4. In SDK tools, install Android Emulator Hypervisor Driver for AMD Processors (installer).


不加速打开模拟器

  1. 打开一个终端.
  2. 与您的用户一起输入 cd C:UsersUserAppDataLocalAndroidSdkemulator.
  3. 使用您的 AVD 设备名称输入 .emulator.exe -avd Pixel_4a_API_30 -accel off.

这篇关于Android Studio Emulator 无法在使用 WHPX 的 Windows 11 上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆