Caused By: Java.lang.outofmemoryerror: Failed To Allocate A 35624972 Byte Allocation With 4194304 Free Bytes And 28mb Until Oom
Here is my code: BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeResource(getResources(), R.drawable.backgro
Solution 1:
Thanks to @CommonsWare and @petey,Loading Large Bitmaps Efficiently works for me.
Solution 2:
This alerts you that in some devices you could have memory problems doing this. Try resizing the image to reduce his size. You also can set a larger memory heap witting android:largeHeap="true" in the manifest but i wouldn't recommend that.
Post a Comment for "Caused By: Java.lang.outofmemoryerror: Failed To Allocate A 35624972 Byte Allocation With 4194304 Free Bytes And 28mb Until Oom"