Android emulator crashing on Mac

21,709

Solution 1

Same issue here, I'm running a mac mini with 8GB of RAM and MacOS Lion. It used to work with the old AVD with some random crashes every now and then but since the last update to APi 17 it's a pain in the neck.

The ADT bundle doesn't work at all. After tweaking the memory limits on eclipse.ini file it throws random memory errors. Also it's not been able to download and install the m2e (maven to eclipse) plugin.

I moved to IntelliJ and I'm able to launch AVD manager but none of the "old" created devices work. If I create a new one and I launch it it works until I close it, then I have to restart the Mac and create a new device. Also it randomly shows errors when I want to delete those old created virtual devices.

Also the DDMS fails to start. I launch it, shows its icon on the Dock but it doesn't respond until I force close. What a Nightmare.

** EDIT ** I found at android dev bug tracker this issue when you're running 2 screens: here

This is happening to me with the android emulator. I solved it like this: cd ~/.android/avd ls *.avd

Now choose the emulator that is crashing and

cd name_of_the_emulator.avd
touch emulator-user.ini
vi emulator-user.ini

And now reset window.x, that's window.x=0 exit and run the emulator.

If you move and close the emulator to the secondary screen it will crash the next time you want to run it.

Solution 2

Kill your Docker process

One problem I have seen multiple time is with Docker. Android Emulator crashes when Docker is running on Mac.

Solution 3

I was following the PhoneGap "Getting Started" guide for Android, and when I got to "Deploy to Emulator," after I created a new AVD, my Mac would crash and reboot. I stumbled on this thread, but thought it worth mentioning that what actually solved the problem for me was an Intel patch for the Hardware Accelerated Execution Manager located here: http://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager

Solution 4

I just updated the Android SDK manager to the latest Android 4.2 (API 17) level updates, and now all my old AVD's crash. The newly created one using API 17 works, however.

Solution 5

This is because Android SDK use some deprecated libraries of Mac OS X. I have the same problem (sometimes even kernel panic) before I start use android device. Maybe in future versions of Android SDK this problem will be fixed.

Share:
21,709
MattSkala
Author by

MattSkala

Android & PHP developer I love beautiful UI design and clean code.

Updated on July 09, 2022

Comments

  • MattSkala
    MattSkala almost 2 years

    When I try to launch Android emulator, it crashes on Mac OS X. It was working some time ago, but now it isn't and I don't have an idea why.

    Crash log: http://pastebin.com/04MjCqaS

    Terminal log in verbose mode: http://pastebin.com/L6y6rUr0

    • Desert Ice
      Desert Ice over 11 years
      Is this while you try to install your app or when you just start the emulator?
    • MattSkala
      MattSkala over 11 years
      I am not even able to start the emulator.
    • Ed_
      Ed_ over 10 years
      If you have 2 monitors running. The emulators don't appear to work well at all on mac. I've taken to using a single monitor for android emulator work.
  • MattSkala
    MattSkala over 11 years
    It's quite annoying that even the newest Android 4.2 emulator isn't working. So there is currently no way to run emulator on Mac?
  • Artyom Kiriliyk
    Artyom Kiriliyk over 11 years
    It run on mac but sometimes crashes. You can increase RAM size to 8 Gb maybe it can help. You can start emulator for not very long period of time and close it when it unnecessary.
  • loeschg
    loeschg over 11 years
    Thanks! Was driving me crazy! So dumb. Come on Google.
  • bigtunacan
    bigtunacan over 11 years
    I've found half a dozen "fixes" for this problem; but yours' is the first that actually worked for me! Life saver!
  • SemperFly
    SemperFly almost 11 years
    To keep this from recurring I used chmod 555 on the emulator-user.ini file.
  • Kevin Coppock
    Kevin Coppock over 10 years
    @SemperFly That is an awesome idea, and works great. (although it should really be patched in the tools)
  • Ngoc Pham
    Ngoc Pham almost 10 years
    1.5 years and the bug is still there throwing rocks to our heads. Darn!
  • Nathan Perrier
    Nathan Perrier almost 10 years
    Workaround works great, thanks! I also updated window.y = 0 just to be safe ;)
  • Luis
    Luis about 7 years
    Same here, I had Docker running and the emulator would not start. After I shutdown Docker the emulator started with no issues.
  • Slims
    Slims about 7 years
    Thank you so much. I spent a ton of time trying to figure out why my emulators stopped working suddenly and this fixed it.