Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

  1. ,
    Expert tip

    Try adding these lines to your manifest: "android:hardwareAccelerated="false"" and "android:largeHeap="true"" as it seems to work for some cases. See also this article about handling bitmaps on android's documentation: https://goo.gl/8LVrzp

  2. ,

    The memory is leaking. Try to analyze the HEAP or use LeakCanacy (https://github.com/square/leakcanary) to figure out where is the exact problem.

Solutions on the web

via GitHub by ctodobom
, 1 year ago
Failed to allocate a 37765132 byte allocation with 8290820 free bytes and 7MB until OOM
via Stack Overflow by Salivan
, 1 year ago
Failed to allocate a 4194316 byte allocation with 1627608 free bytes and 1589KB until OOM
via Stack Overflow by Whiz
, 1 year ago
Failed to allocate a 4194316 byte allocation with 3271760 free bytes and 3MB until OOM
via Stack Overflow by Alberto
, 2 years ago
Failed to allocate a 16777228 byte allocation with 2655368 free bytes and 2MB until OOM
via GitHub by tonyr59h
, 8 months ago
Failed to allocate a 6885388 byte allocation with 4572224 free bytes and 4MB until OOM
via GitHub by princejohn123
, 3 months ago
Failed to allocate a 2822700 byte allocation with 556160 free bytes and 543KB until OOM
java.lang.OutOfMemoryError: Failed to allocate a 37765132 byte allocation with 8290820 free bytes and 7MB until OOM	at dalvik.system.VMRuntime.newNonMovableArray(Native Method)	at android.graphics.Bitmap.nativeCreate(Native Method)	at android.graphics.Bitmap.createBitmap(Bitmap.java:838)	at android.graphics.Bitmap.createBitmap(Bitmap.java:815)	at android.graphics.Bitmap.createBitmap(Bitmap.java:746)	at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:622)	at com.todobom.opennotescanner.FullScreenImageAdapter.instantiateItem(FullScreenImageAdapter.java:67)	at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:870)	at android.support.v4.view.ViewPager.populate(ViewPager.java:1054)	at android.support.v4.view.ViewPager.populate(ViewPager.java:952)	at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1474)	at android.view.View.measure(View.java:17565)	at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:727)	at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:463)	at android.view.View.measure(View.java:17565)	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5537)	at android.widget.FrameLayout.onMeasure(FrameLayout.java:436)	at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135)	at android.view.View.measure(View.java:17565)	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5537)	at android.support.v7.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:391)	at android.view.View.measure(View.java:17565)	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5537)	at android.widget.FrameLayout.onMeasure(FrameLayout.java:436)	at android.view.View.measure(View.java:17565)	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5537)	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436)	at android.widget.LinearLayout.measureVertical(LinearLayout.java:722)	at android.widget.LinearLayout.onMeasure(LinearLayout.java:613)	at android.view.View.measure(View.java:17565)	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5537)	at android.widget.FrameLayout.onMeasure(FrameLayout.java:436)	at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2615)	at android.view.View.measure(View.java:17565)	at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2045)	at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1196)	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1409)	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1084)	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5990)	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)	at android.view.Choreographer.doCallbacks(Choreographer.java:580)	at android.view.Choreographer.doFrame(Choreographer.java:550)	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)	at android.os.Handler.handleCallback(Handler.java:739)	at android.os.Handler.dispatchMessage(Handler.java:95)	at android.os.Looper.loop(Looper.java:135)	at android.app.ActivityThread.main(ActivityThread.java:5343)	at java.lang.reflect.Method.invoke(Native Method)	at java.lang.reflect.Method.invoke(Method.java:372)	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)