Reputation: 555
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:
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?
A threading issue - perhaps the thread is not being properly shut down or restarted?
Any help would be appreciated!
Upvotes: 10
Views: 12686
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
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