Android Emulator fails to execute and doesn't start

Emixam23Emixam23 USMember ✭✭✭

Hi,

It's pretty weird but since like 2 weeks, I can't start my android emulator Android_Accelerated_x86.

Starting emulator for AVD 'Android_Accelerated_x86'
Failed to open vm 4
Failed to create HAX VM
No accelerator found.
failed to initialize HAX: Invalid argument
Hax is enabled
Hax ram_size 0x40000000

Before, it was working perfectly, what do you think could the cause?

Thank in advance

Answers

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai

    @Emixam23

    Hmm, not sure why it would suddenly stop working. The error would seem to indicate that there is some issue with the HAXM module, but it could be something corrupted with the emulator image.

    I would first try clearing the user data. If you still have the GUI Google Emulator Manager (you will if your Android SDK Tools are version <= 25.2.5), open it with the Tools-> Google Emulator Manager, then:
    1. Select the AVD that is not launching
    2. Click "Start" on the right
    3. In the launch options window that opens, select the option to Wipe user data.
    4. Click "Launch"

    If you do not have the CUI Google Emulator Manager then you either have to switch to using the Android SDK Tools version <= 25.2.5. You can switch to that version using the Tools->SDK Manager-> Tools tab and select only the Android SDK Tools 25.2.5 in the Android SDK Tools section. Or use the command line, in which case:
    1. Open Terminal on your Mac
    2. Enter the following command to list your AVDs
    emulator -list-avds
    3. Look in the above list for the emulator you are trying to launch and enter the following in terminal:
    emulator -avd name-of-emulator-from=-above-list -wipe-data

    If that fails, the next thing I might suggest is to delete and recreate the offending emulator. It may also be worth re-running the HAXM installer.

  • Emixam23Emixam23 USMember ✭✭✭

    Hi Jon,

    The first solution, I do it all the time.. with Android SDK Tools 25.2.5

    The second one gave the same:

    [email protected]:~/Library/Developer/Xamarin/android-sdk-macosx$ emulator -avd Android_Accelerated_x86 -wipe-data
    Hax is enabled
    Hax ram_size 0x40000000
    Failed to open vm 3
    Failed to create HAX VM
    No accelerator found.
    failed to initialize HAX: Invalid argument
    

    About what you said, I saw that I have 2 Android SDK Tools:

    Android SDK Tools => However, this one is 26.1.1
    Android SDK Tools 25.2.5

    So I tried to install the 26.1.1 version and... it uninstalled the other one without installing itself and now... When I try to install/downlaod, it seems to complete de download but nothing happens...

  • JimBennettJimBennett GBXamarin Team, Insider, University, Developer Group Leader ✭✭✭✭

    Do you have HAXM installed? Maybe try re-installing it, you can download it from Intel.

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai

    @Emixam23 said:
    About what you said, I saw that I have 2 Android SDK Tools:

    Android SDK Tools => However, this one is 26.1.1
    Android SDK Tools 25.2.5

    So I tried to install the 26.1.1 version and... it uninstalled the other one without installing itself and now... When I try to install/downlaod, it seems to complete de download but nothing happens...

    yeah, I saw the same thing. I had both installed and the 26 version appeared to be the selected version. Tried to select the 25.2.5 version and both were uninstalled, so I just reselected the 25.25 version and then that one (and only that one) installed. I believe that we left the ability to select the 26.2.5 version separately selectable is so that people who hate the command line could still use the GUI Google Android Emulator Manager.

    I also saw a similar issue once when the emulator system images in the Android SDK needed to be updated... and then I had to edit, or delete and re-create, my emulators to use the updated system images.

  • Same problem here.

    I can't start emulator because it says No accelerator found.

    I have HAXM installed.

    Did you guys found a workaround?

  • Emixam23Emixam23 USMember ✭✭✭

    Not yet... I haven't search since a while, if you find anything, please post an answer here :) thanks

  • mallibonemallibone USUniversity ✭✭

    Just as a little addition to @JGoldberger solution. Download the SDK from intels site (at the time of writing Version 6.2.1). Use the mdk installer, which is located in the dmg file. After installation restart your mac. Now your Emulator should be working again.

Sign In or Register to comment.