java.lang.OutOfMemoryError

tip

For most cases,recommend that you use the Glide library to fetch, decode, and display bitmaps in your app. Glide abstracts out most of the complexity in handling these and other tasks related to working with bitmaps and other images on Android.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • OutOfMemoryError of Bitmap in Android
    via Stack Overflow by anddev
    ,
    • java.lang.OutOfMemoryError: bitmap size exceeds VM budget at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:304) at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:149) at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:174) at android.graphics.drawable.Drawable.createFromPath(Drawable.java:729) at android.widget.ImageView.resolveUri(ImageView.java:484) at android.widget.ImageView.setImageURI(ImageView.java:281) at android.widget.SimpleCursorAdapter.setViewImage(SimpleCursorAdapter.java:183) at android.widget.SimpleCursorAdapter.bindView(SimpleCursorAdapter.java:129) at android.widget.CursorAdapter.getView(CursorAdapter.java:150) at android.widget.AbsListView.obtainView(AbsListView.java:1057) at android.widget.ListView.makeAndAddView(ListView.java:1616) at android.widget.ListView.fillSpecific(ListView.java:1177) at android.widget.ListView.layoutChildren(ListView.java:1454) at android.widget.AbsListView.onLayout(AbsListView.java:937) at android.view.View.layout(View.java:5611) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119) at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1108) at android.widget.LinearLayout.onLayout(LinearLayout.java:922) at android.view.View.layout(View.java:5611) at android.widget.FrameLayout.onLayout(FrameLayout.java:294) at android.view.View.layout(View.java:5611) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:999) at android.widget.LinearLayout.onLayout(LinearLayout.java:920) at android.view.View.layout(View.java:5611) at android.widget.FrameLayout.onLayout(FrameLayout.java:294) at android.view.View.layout(View.java:5611) at android.view.ViewRoot.performTraversals(ViewRoot.java:771) at android.view.ViewRoot.handleMessage(ViewRoot.java:1103) at android.os.Handler.dispatchMessage(Handler.java:88) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:3742) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) at dalvik.system.NativeStart.main(Native Method)

    Users with the same issue

    Hiren Amaliyar
    1 times, last one,
    bayukresno
    7 times, last one,
    Unknown visitor2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,