AVD Emulator stuck on loading screen in Android Studio

I decided to try Android Studio 2.0 having used Eclipse in the past but I'm having considerable difficulty getting the AVD to load correctly. I've done quite a bit of googling and research into the problem, both here on SO and Google.So far nothing has worked.

The emulator simply hangs on the android load-up screen ever time I try to run it. I've seen it advised to use Genymotion but I would first prefer to resolve the issue natively in Android Studio to feel confident going forward using the IDE for building projects.

Here's what I've tried:

  • Complete reinstall of Android, SDK and SDK Tools

  • Install and configure of Intel x86 accelerator

  • Lowered the RAM amount to 512 in AVD settings

  • Multiple attempts at deleting and recreating AVD's

  • Tried creating different AVD phone models(Nexus One,Nexus 5x etc.)

  • Resetting ADB in AVD Monitor Tool

  • Starting ADB server from terminal

  • Restarting Android Studio multiple times after changes

  • Running SDK/SDK Tools updates several times

  • Made sure the SDK path is correct

These are the majority of the "solutions" I found either on other similar SO questions or by googling none of which has resolved the problem.

When I run the emulator currently it displays the following in the run window:

/Users/<username>/Library/Android/sdk/tools/emulator -netdelay none -netspeed full -avd Nexus_5X_API_23
Warning: requested ram_size 1024M too big, reduced to 512M
emulator: WARNING: Increasing RAM size to 1024MB
emulator: WARNING: VM heap size set below hardware specified minimum of 228MB
emulator: WARNING: Setting VM heap size to 256MB
Hax is enabled
Hax ram_size 0x20000000
HAX is working and emulator runs in fast virt mode.
console on port 5554, ADB on port 5555 

The emulator shows up fine in the Android AVD Monitor devices pane and even appears to go through the entire booting process on the emulator screen itself but never gets to the Android home screen. Also, Logcat seems to be looping continuously through dozens of errors and warnings, which don't offer any clear indication of what the issue might be or direction of how to resolve it.

I feel like I've exhausted every idea and not sure how to move forward.Just for the record, I am running El Capitan 10.9.2 with a 2.4gh Intel Core 2 Duo and 4gb ram.It's not the fastest machine for sure but should be capable of running Android Studio and the emulator.

Any help or guidance resolving this problem is gratefully appreciated!


Solution 1:

For me this worked: in AVD(Tools->AVD) click on the small arrow for desired emulator then click on "Wipe data".

After that, it successfully started - passed the android logo screen - although a bit slowly.

Solution 2:

You have two thing:

  1. You should Increase your ADB emulator Heap to the minimum required.

    in your case: 512M

    into your AVD Manager:

    • Click Edit on your Emulator
    • "Show Advanced Settings" at the bottom
    • Go to: "Memory and Storage"
    • Edit the VM heap value to 512 MB
    • Finished

    Image:

    EDIT AVD

    Show advanced settings

    Edit VM heap

  2. You can Wipe data to your Emulator. here is an exemple website

Solution 3:

At one point my laptop hit a kernel panic and restarted while running an active AVD emulator session. When attempting to restart the emulator, the emulated device (Pixel 3) stayed stuck on the startup splash logo screen.

Fix steps:

  1. Stop hung emulator session.

  2. rm ~/.android/avd/name_of_emulated_device.avd/*.lock

  3. rm ~/.android/avd/name_of_emulated_device.avd/*.qcow2

  4. Restarting the emulated AVD should now be successful.

Windows equivalent for ~/.android should be C:\Users\.android, but I can't confirm this myself.

Note: You will likely lose any additionally installed apps and current work that was on the AVD.