Issue
I have Windows 11 on my system.
The system specifiction:
- Edition: Windows 11 Home Single Language
- Update: 21H2
- Installed on: 06-07-2021
- OS build: 22000.65
- Experience: Windows Feature Experience Pack 421.17400.45.3
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
- Windows HyperVisor Platform
- Virtual Machine Platform
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.
Solution
Final Update:
As stated by Георги Ангелов:
The latest version of Android Emulator - 31.1.2 is fixing the issue. Update through SDK Manager. Released 11/11/2021.
Update:
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!
From https://issuetracker.google.com/issues/202188690#comment48
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.
There are two possible workarounds:
Disable Hyper-V (Keep in mind WSL2 or any VM won't work without this)
To disable Hyper-V you must follow these steps:
- Open
Turn Windows features on or off
. - Uncheck
Hyper-V
andWindows Hypervisor platform
(it may be required to uncheckWindows Sandbox
). - Open Android Studio and SDK Manager.
- In SDK tools, install
Android Emulator Hypervisor Driver for AMD Processors (installer)
.
Open the emulator with no acceleration
- Open a terminal.
- Enter
cd C:\Users\User\AppData\Local\Android\Sdk\emulator\
with your user. - Enter
.\emulator.exe -avd Pixel_4a_API_30 -accel off
with your AVD device name.
Answered By - Zeswen
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.