I have Windows 11 on my system.
The system specifiction:
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
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....\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: WHPX: Failed to setup partition, hr=c0350005
C:\Users....\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: failed to initialize WHPX: Invalid argument
Anyone got suggestions, how to resolve this issue.
The System Requirements for Android Studio on Windows Your PC must meet the following requirements to run Android Studio efficiently: 64-bit Microsoft Windows OS 8/10/11. 1280 x 800 minimum screen resolution. x86_64 CPU architecture; 2nd generation Intel Core or newer; or AMD CPU with Hypervisor support.
Your computer must be running Windows 11 or Windows 10 Version 1909 or later.
If the Android Emulator does not start properly, this problem is often caused by problems with HAXM. HAXM issues are often the result of conflicts with other virtualization technologies, incorrect settings, or an out-of-date HAXM driver. Try reinstalling the HAXM driver, using the steps detailed in Installing HAXM.
Installing from Android SDK Manager Go to Android SDK Manager (Tools -> SDK Manager) and select SDK Tools. You will find the Intel x86 Emulator Accelerator HAXM installer listed here. Select it and click on OK.
As stated by Георги Ангелов:
The latest version of Android Emulator - 31.1.2 is fixing the issue. Update through SDK Manager. Released 11/11/2021.
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/emulator-linux_x64-7869535.zip
macosx: https://dl.google.com/android/repository/emulator-darwin_x64-7869535.zip
WHPX as of now is not working with Windows 11, I will update this answer when it gets fixed.
To disable Hyper-V you must follow these steps:
Turn Windows features on or off
.Hyper-V
and Windows Hypervisor platform
(it may be required to uncheck Windows Sandbox
).Android Emulator Hypervisor Driver for AMD Processors (installer)
.cd C:\Users\User\AppData\Local\Android\Sdk\emulator\
with your user..\emulator.exe -avd Pixel_4a_API_30 -accel off
with your AVD device name.The latest version of Android Emulator - 31.1.2 is fixing the issue. Update through SDK Manager. Released 11/11/2021.
You must disable "Virtual Machine Platform" too, not just Hyper-V
Current solution until Google releases a new version of the emulator:
Download the binaries from https://issuetracker.google.com/issues/202188690#comment27 and extract them into your emulator directory, replacing the qemu binaries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With