3

today, suddendly, all my Android Emulators (on Win10 / IntelliJ IDEA), started complaining about a missing library.

When i launch any emulator, during loading, i read on the console log:

Emulator: Could not load library 'WinHvPlatform.dll'

then, the emulator starts and seems to run OK.

But... does anyone have an idea what it could be the cause ? What is that library ?

3
  • Same thing for me: PS D:\Android\sdk\emulator> ./emulator -avd Nexus_5X_API_22 Could not load library 'WinHvPlatform.dll'. D:\Android\sdk\emulator/emulator-x86.exe: invalid option -- '-enable-whpx'
    – Sid Go
    Commented Jul 16, 2018 at 13:48
  • WinHvPlatform.dll is probably the Hyper-V platform library. Commented Jul 17, 2018 at 11:36
  • I've got the same issue. Happened all of a sudden, and I'm having trouble installing my app to the emulator. Been working fine previously and no significant updates installed to cause this
    – TomH
    Commented Jul 17, 2018 at 20:43

2 Answers 2

2

It's because Microsoft has worked with Google to allow using Hyper-V instead of Intel HAXM as hypervisor. See these articles:

The Windows Hypervisor Platform was introduced in the Windows 10 April 2018 Update and enables third-party virtualization stacks to utilize the Windows Hypervisor for hardware acceleration. If you are using Hyper-V, this stack replaces Intel HAXM as the hypervisor for the Android emulator.

If you run the ANDROID_SDK\emulator\emulator.exe -avd YOURAVD -verbose you might get this output:

emulator: Checking whether Windows Hypervisor Platform (WHPX) is available.
emulator: Could not load library WinHvPlatform.dll
emulator: WHPX is either not available or not installed.
emulator: CPU Acceleration: DISABLED
emulator: CPU Acceleration status: HAXM is not installed on this machine
emulator: ERROR: x86_64 emulation currently requires hardware acceleration!

You could follow the instructions in the above posts to turn off Windows Hypervisor for Google's Android emulator in %USERPROFILE%\.android\advancedFeatures.ini by setting:

WindowsHypervisorPlatform=off
2

Hyper-V should be disabled for the Android emulators, and use Intel HAXM instead (if your processor supports it). Also make sure you are using the updated Android SDK 27 tools and emulators, they can be updated as explained in this article.

Not the answer you're looking for? Browse other questions tagged or ask your own question.