java.lang.OutOfMemoryError

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
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.

  • GitHub comment 100#247355389
    via GitHub by sugarmanz
    ,
  • GitHub comment 26#58936797
    via GitHub by ninjagoat
    ,
    • java.lang.OutOfMemoryError at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) at android.graphics.BitmapFactory.decodeStreamInternal(BitmapFactory.java:709) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:685) at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:447) at com.afollestad.materialcamera.util.ImageUtil.getRotatedBitmap(ImageUtil.java:84) at com.afollestad.materialcamera.util.ImageUtil.getRotatedBitmap(ImageUtil.java:96) at com.afollestad.materialcamera.util.ImageUtil.getRotatedBitmap(ImageUtil.java:96) at com.afollestad.materialcamera.util.ImageUtil.getRotatedBitmap(ImageUtil.java:64) at com.afollestad.materialcamera.internal.StillshotPreviewFragment.setImageBitmap(StillshotPreviewFragment.java:74) at com.afollestad.materialcamera.internal.StillshotPreviewFragment.access$000(StillshotPreviewFragment.java:19) at com.afollestad.materialcamera.internal.StillshotPreviewFragment$1.onPreDraw(StillshotPreviewFragment.java:57) at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:888) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2199) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6637) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:814) at android.view.Choreographer.doCallbacks(Choreographer.java:614) at android.view.Choreographer.doFrame(Choreographer.java:584) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:800) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:146) at android.app.ActivityThread.main(ActivityThread.java:5602) 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:1283) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099) at dalvik.system.NativeStart.main(Native Method)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    dmitrydmitry
    33 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    2 more bugmates