Android Out Of Memory At Setcontentview
I've made a full screen click-through app that has 6 screens. The app goes from screen upon a click. Each screen has it's own activity (Step1, Step2, Step3 etc until Step 6). Nothi
Solution 1:
A few things to look at.
- Have you provided the background image(s) for several densities? Scaling is sometimes consuming a lot of memory.
- Do you use
startActivity
orstartActivityForResult()
? In the latter case, your older Activity objects cannot be destroyed. - Do you collect information in the
Application
class?
Solution 2:
recycle()
your Bitmaps as soon as you leave an activity to go to the other and reorder code:
bitmap.recycle();
System.gc();
Intent myIntent = new Intent(Step3.this, Step6.class);
Step3.this.startActivity(myIntent);
Post a Comment for "Android Out Of Memory At Setcontentview"