I am just fetching an image from drawable and getting it into bitmap but while getting into bitmap its throws an error
java.lang.OutOfMemoryError: Failed to allocate a 1250874912 byte allocation with 16777216 free bytes and 338MB until OOM
Here is my code below
Bitmap icon = BitmapFactory.decodeResource(getResources(),
R.drawable.vr_image);
int size = icon.getByteCount();
Some solution found on stackoverflow but these also not working.
on manifest under application tag i have define following values
android:allowBackup="true"
android:hardwareAccelerated="false"
android:largeHeap="true"
android:supportsRtl="true"
So any one can help me out from this problem not getting any solution for this.