Android emulator crashes as soon as it starts

After a complete reinstall of my mac and Xamarin Studio, I was quite surprised to see my Android simulator die on startup. No messages where displayed in the XS “Error” pad or “Deploying to device” pad. Just “Execution failed”.

The problem

I opened up the AVD manager and started an emulator manually. The result was the same, but at least I had some feedback:

HAX is working and emulator runs in fast virt mode.
emulator: Listening for console connections on port: 5554
emulator: Serial number of this emulator (for ADB): emulator-5554
Failed to sync vcpu reg
emulator: ERROR: Unfortunately, there's an incompatibility between HAXM hypervisor and VirtualBox 4.3.30+ which doesn't allow multiple hypervisors to co-exist.  It is being actively worked on; you can find out more about the issue at http://b.android.com/197915 (Android) and https://www.virtualbox.org/ticket/14294 (VirtualBox)

After searching the web, it seems that the Android emulator isn’t so happy when docker is running on your machine. Turning off docker when starting an emulator is a workaround. Yes, you really need to “quit” docker. Even when no instance is running you can’t start an emulator.

Fixing the problem

Installing HAXM 6.1.1 seems to solve the problem. Only, when I installed it via the Android SDK Manager I still got the same issues. When installed via the Android SDK Manager, the necessary files are made available in the folder:

/Users/$username$/Library/Developer/Xamarin/android-sdk-macosx/extras/intel/Hardware_Accelerated_Execution_Manager

Running the IntelHAXM_6.1.1.dmg installer again (although I got the message it was already installed) solved the problem.

References