8

I am developing an app for android using Xamarin. I am using Visual Studio 2017 and the Android SDK emulator that came with the Xamarin package from the visual studio installer.

The emulator is very slow. I followed the instructions in this article to enable acceleration with Hyper-V: https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration

The article does not say anything about having to set up a VM or configure the emulator itself to use Hyper-V, only how to enable Hyper-V...

The emulator is still slow. How can I verify that the emulator is actually using Hyper-V?

Nesh
  • 147
  • 1
  • 7
  • What emulator are you using? Did you remember that the ARM-based emulator images will not be accelerated? – Leszek L Feb 25 '19 at 13:13
  • I am using the emulator that the Android SDK Manager calls "Android Emulator", version 27.3.9. The Xamarin package from the visual studio installer included an image called "Android_Accelerated_x86_Oreo (Android 8.1 - API 27)" and the Android Device Manager says "Processor: x86". – Nesh Feb 25 '19 at 13:54

1 Answers1

4

In Documentation Microsoft suggest to run the following command to see which Acceleration you use:

"C:\Program Files (x86)\Android\android-sdk\emulator\emulator-check.exe" accel

Also make sure you use a recent Windows 10 Build, the Hyper-V Platform only works since Version 1803, but not in older Windows 10 Versions.

If you still have issues, follow the Microsoft documentation, it shows a lot of tips.

magicandre1981
  • 27,895
  • 5
  • 86
  • 127
  • 1
    Thanks @magicandre1981. While the output says "HAXM is not installed, but Windows Hypervisor Platform is available." ... there isn't anything showing in Hyper-V Manager to indicate any new VMs exist or are running. In Task Manager the process qemu-system-i386 can be seen with the children (Android Emulator, Windows Command Processor, and emulator64-crash-service). Again nothing definitive linking to Hyper-V. In Task Manager for the process qemu-system-i386 the command line does show -feature WindowsHypervisorPlatform :) So it launched with that intent. – DaveWilliamson Jun 22 '19 at 22:50
  • 2
    For others hunting for a success message from their Hyper-V installation for android emulator acceleration, the output of `%ANDROID_HOME%\emulator\emulator-check.exe accel` for me was `WHPX (10.0.18363) is installed and usable.` – nonbeing Dec 21 '19 at 17:41