Fix for the Android Emulator crashing during launch

UPDATE 2017.08.03: This should be fixed with the release of HAXM 6.1.1. Make sure you’re running the latest version of Android Studio

On a recent project I was working on, I wasn’t able to start the Android Emulator anymore from within Android Studio. It would launch, but then – without any errors or warnings – close all by itself.

Upon launching the Android Emulator from the Command Line I finally got an error visible:

$ cd $(dirname $(which emulator)) && ./emulator -avd Nexus_5X_API_25
emulator: WARNING: encryption is off
Hax is enabled
Hax ram_size 0x60000000
HAX is working and emulator runs in fast virt mode.
Failed to sync vcpu reg
Failed to sync vcpu reg
Failed to sync vcpu reg
Failed to sync vcpu reg
Failed to sync vcpu reg
Failed to sync HAX vcpu contextInternal error: Initial hax sync failed

One Google Search Coupon later it turns out the thing preventing the emulator from running was “that other thing using vcpu’s”docker.

👉 Killing docker will let you run the Android Emulator without any problems.

I haven’t tested other suggested solutions (such as tweaking the settings of the virtual device), but at least this one did it for me.

Elsewhere , ,

5 Responses to Fix for the Android Emulator crashing during launch

  1. DJ Binks says:

    Thank you! Suddenly today my Android emulator refused to start (and of course I need to get a few things done urgently), turned out that docker was the culprit (a recent update resulted in it being enabled).

  2. Pedro Gaspar says:

    Hi, for me was VBox, just for those who come into this issue and not having Docker running. Nevertheless, it lead me to look for VBox which I knew I had running.

  3. alfabero says:

    But what can I do if I’m actually running docker containers as part of my app setup? Any ideas

  4. alfabero says:

    I found this useful (source https://forums.docker.com/t/cant-using-docker-for-mac-with-android-emulator-haxm/8939/11):

    Considering the bug fixed: HAXM 6.1.1 (available as a part of Android Studio or on Intel website at https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager ) is designed to coexist with Docker/VirtualBox/HVF hypervisors on Mac OS

    Important note, taken on Intel’s website:

    The SDK Manager will download the installer to the “extras” directory, under the main SDK directory. Even though the SDK manager says “Installed” it actually means that the Intel HAXM executable was downloaded. You will still need to run the installer from the “extras” directory to finish installation.

Leave a Reply

Your email address will not be published. Required fields are marked *