Emad Y
Emad Y

Reputation: 425

Android Memory Leaks Issue

I was experiencing a memory leak problem with one of my apps, and after many hours, I instead decided to create a new project as a dumbed down version of the app:

The problem:

More Details:

I've spent all day on this, and created countless new projects just to test it, and I'm still lost. I know most people can't provide an answer based on the given information, but if you can tell me the next steps, or some things to try to figure out the problem, that counts as an answer too.

Upvotes: 1

Views: 116

Answers (1)

Hussein El Feky
Hussein El Feky

Reputation: 6707

Add in your AppManifest.xml in your application tag this code:

android:largeHeap="true"

This will try to prevent your app from causing OutOfMemoryError.

Documentation: http://developer.android.com/guide/topics/manifest/application-element.html#largeHeap

Although this is not a very recommended solution, it should still work...

You can also try to decrease your images' resolution if they are so large.

If problem still persists, I highly recommend to check this link: http://developer.android.com/training/displaying-bitmaps/load-bitmap.html#load-bitmap

Upvotes: 1

Related Questions