5

when I launch the emulator in Android Studio, the following two errors occur in the event log:

Emulator: handleCpuAcceleration: feature check for hvf
Emulator: cannot add library vulkan-1.dll: failed

Someone knows how to solve them? Thank you,

Marco

marco94
  • 157
  • 1
  • 7
  • Have the same error. Logs after that error: ...Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: WHPX: Failed to get virtual processor registers, hr=c0350005 C:\Users\nilss\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: WHPX: Failed to emulate PortIO access with EmulatorReturnStatus: 64 C:\Users\nilss\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: WHPX: Failed to exec a virtual processor emulator: Android emulator version 30.4.3.0 (build_id 7104519) (CL:N/A) – nstrelow Feb 07 '21 at 17:54
  • hey there @marco94 you can accept my answer... It is correct one – Ucdemir Jul 16 '21 at 06:31

2 Answers2

10

I met this situation when I upgrade android emulator to 30.7.5

You need to create

"advancedFeatures.ini"

inside android folder

C:\Users\YourUser.android\advancedFeatures.ini

put this text inside it

# Here's how to disable Vulkan apps to talk to the emulator.

# Add the following lines to ~/.android/advancedFeatures.ini (create this file if it doesn't exist already):

Vulkan = off
GLDirectMem = on
Ucdemir
  • 2,852
  • 2
  • 26
  • 44
0

I think you don't have the JDK installed.

Check it out with this command (for example, on the command line):

flutter doctor

If there is an exclamation mark or a red cross next to the "Android toolchain" line, then you do not have the JDK installed.

The solution to this problem is very simple:

  1. Download JDK from this link;
  2. Extract it and rename the internal folder “jdk8u202-b08” to “openjdk” and copy it under HDD or SSD (so its path will be: C:\openjdk);
  3. Set Some Environment variables (search on google if you don't know). Name: "JAVA_HOME", path "C:\openjdk";
  4. To restart a computer.

This should help. Good luck!

gorevanova
  • 539
  • 1
  • 7
  • 16