57

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!

mikeym
  • 5,705
  • 8
  • 42
  • 62
  • 1
    Any solution for this ? – cryptic Apr 25 '16 at 04:48
  • 1
    I haven't been able to find a fix for it.I spent quite a bit of time troubleshooting it and have tried every suggestion solution I could find to no avail.Couldn't waste any more time on it so I finally succumbed to going with Genymotion which, although not totally trouble-free(at least on my box),at least launches and loads a basic app so far.Sorry can't be of more help than that. – mikeym Apr 25 '16 at 20:10
  • https://stackoverflow.com/a/47140422 i have issue in emulator and this answer solve my – Mahmoud Helmy Jun 25 '21 at 16:00

12 Answers12

80

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.

Subhan Ali
  • 1,370
  • 13
  • 17
arcol
  • 1,510
  • 1
  • 15
  • 20
  • Confirmed. As I understand, this *maybe* happen, when you download a newer android image in the same virtual device, where data from previous android image exists. – Chameleon Feb 24 '18 at 14:48
  • It looks odd but wiping data right after creatioin helped to run hi-res 1440x2560 AVD, no freezes. Other AVDs with more low-res ran with no issues, but hi-res was stucking... Tnx! – Alex Green Apr 03 '19 at 08:07
  • Worked for me, I know I started the AVD first time by accident and I didn't let it finish as I was using a real phone at the time. So data was probably corrupt. Thanks! – JPM Jul 06 '22 at 17:04
  • I didnt want to Wipe Data. I don't understand why there is no option to Restart a stuck emulator. It always Saves state when closed. – M. Usman Khan Jan 23 '23 at 16:31
46

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

Jean-philippe Emond
  • 1,619
  • 2
  • 17
  • 29
10

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.

changingrainbows
  • 2,551
  • 1
  • 28
  • 35
  • My AVD device was always stuck at launch time, leading to the app installation process to loop until timeout, and this solution worked well for me, thanks! – joubs Jan 05 '21 at 09:32
  • 1
    This essentially wipes all user data. – pratclot Jul 22 '21 at 14:17
8

Unfortunately, increasing the heap size didn't help in my case. The virtual device was actually running fine before with the previous amount of heap.

What I eventually ended up doing was just creating a new virtual device through the AVD manager leaving most of the fields the default value. The new device ran fine and booted up as expected and was able to run my app. It's possible something in my first virtual device became corrupted.

Create Virtual Device

The Unknown Dev
  • 3,039
  • 4
  • 27
  • 39
1

I had the same problem. I'm running El Capitan 10.11.5 with a 2.0GHz Intel Core 2 Duo and 8GB RAM, Android Studio 1.5.1.

After upgrading to Intel x86 Emulator Accelerator (HAXM Installer), rev 6.1.1 and deleting my API 14 SDK and related files, the newly installed API 23's Google APIs Intel x86 Atom System Image would not get past the Android logo screen.

After much trial & error, the Intel x86 Atom System Image (not Google APIs Intel x86 Atom System Image) for API 15 finally loaded the home screen on the emulator after ~ 8 min and one android system crash.

Will try the Intel x86 Atom System Image for API 23 later. Hope that helps.

Mse Huyu
  • 11
  • 1
1

I had the same problem and none of the steps listed here helped me, either.

But since the solution that worked for me was not mentioned here yet, I thought it might help you or one of the others finding this thread:

What did work for me was disabling certain settings in my Avast Antivirus as proposed by the Android studio troubleshooting page here.

My version of Avast did not have the setting "Use nested virtualization when available", however just turning off "Enable Hardware assisted virtualization" (note: restart is required for it to take effect) solved the problem just fine.

So if you are using Avast or another Antivirus which manipulates virtualization, be sure to look through the correspondent settings.

Candelero
  • 11
  • 2
1

I had experienced same problem, What I did was, I clicked on the drop down in the actions column, then clicked on wipe Data, and that resolved it for me on ubuntu 20.04

Mundruku
  • 229
  • 4
  • 5
  • 1
    Please don't add "thank you" as an answer. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation), you will be able to [vote up questions and answers](https://stackoverflow.com/help/privileges/vote-up) that you found helpful. - [From Review](/review/late-answers/30047842) – Smit Gajera Oct 11 '21 at 11:33
1

I had this problem and running as admin fixed this (drove me crazy). Hope this works for you too tried some many fixes.

Vee Lad
  • 31
  • 4
1

I tried all the advices. The only thing that worked for me was:

Change emulator settings

Emulated Performance - Graphics

from: Automatic 
to: Software (GLES 2.0)
zag2art
  • 4,869
  • 1
  • 29
  • 39
0

I also had the same problem with my AVD. After lots of trial and error I arrived at a solution for my problem. the problem was with the Heap size and the RAM size. Initially the default heap size was 128 MB and RAM was 1563 , I just changed the heap size to 512 MB and reduced the RAM size( high RAM was making my pc run slow) also I enabled hardware acceleration. And Yipeee, it worked.

  • 4
    This was already suggested over a year ago and didn't work. Please read others answers first before posting. – mikeym Jun 13 '17 at 19:12
0

What worked for me?

  • Create new project with same configs.
  • And start your old emulators in it.

What did not work?

  • Wiping data.
  • Increasing Heap size.
  • Creating new virtual device.
Vishal Singh
  • 725
  • 7
  • 16
-2

It's very easy to fix all you need to do is go in AVD Manager click on the small arrow on most right side of the screen beside the edit icon. Click that small arrow and select wipe data. Now when you'll start your AVD it will restart and work properly.