Android emulator not starting at all

I had a smiliar problem in MacOS Sierra 10.12.4 and Android Studio 2.3.1.

I tried everything, I uninstalled and reinstalled Android Studio, rebooted the computer, cleared the .android folder and created a new avd image. Nothing helped me, but finally I ran this command (See more in Android Documentation):

emulator -partition-size 512 -avd avd_name 

And I received this error:

emulator: WARNING: encryption is off
Hax is enabled
Hax ram_size 0x40000000
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 HAX vcpu contextInternal error: Initial hax sync failed 

With that, I discovered that my solution was to stop Docker-Machine, and, like magic, it solved the problem.


I had this issued after upgrading Android Studio.

  • Open the AVD manager
  • Open the context menu for your image. (right click)
  • Select Cold Boot Now

ScreenShot


When you say, "Everything worked fine yesterday", you should first ask yourself what you have changed since; have you installed anything that could interfere with the emulator?

Personally, I would download a fresh copy of the Android SDK, remove the reference to the currently installed version from your PATH, and add the new one.

I should think that would solve your issue (at least, being able to start an AVD that is).

One more thing to note is that the AVD can sometimes be quite slow to startup. On one of my machines, it has taken up to 7 minutes to boot up. So try emulator -avd avdname, then go make a coffee and see if it works when you return :)

Good luck!