Paymon Wang-Lotfi
Paymon Wang-Lotfi

Reputation: 555

"Unfortunately, Launcher has stopped" on Android Nexus 6 emulator

When testing my 2D game on the Nexus 6 emulator, the app launches and works fine the first time. But when I close out of the app and try to reopen it, I get a "Unfortunately, Launcher has stopped" and the emulator crashes. This only happens on the Nexus 6 emulator, on other older AVDs the app reopens fine. Nothing shows up in Logcat when this happens.

I was wondering if anyone knew why this happens and only on the Nexus 6 emulator. I have suspected the following culprits but I am not sure:

  1. Out of memory - I do not release any of the bitmap resources used in the game, should I be doing this and if so, should it be from the surfaceDestroyed() method?

  2. A threading issue - perhaps the thread is not being properly shut down or restarted?

Any help would be appreciated!

Upvotes: 10

Views: 12686

Answers (2)

anataliocs
anataliocs

Reputation: 10737

On Mac here was the default install location for me:

cd /usr/local/Cellar/android-sdk/24.1.2/tools

Then in that folder I ran

android avd

Then I set the following settings RAM 1536 mb VM Heap 64 mb

Internal Storage 768mb SD Card 768mb

Upvotes: 0

Paymon Wang-Lotfi
Paymon Wang-Lotfi

Reputation: 555

Well I figured it out, turns out if I increase the RAM and heap space in the AVD advanced settings slightly I do not have this issue.

Upvotes: 15

Related Questions