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 minstrelsy
, 1 year ago
Failed to allocate a 26211852 byte allocation with 16777216 free bytes and 21MB until OOM
via Stack Overflow by snachmsm
, 2 years ago
Failed to allocate a 155148 byte allocation with 129688 free bytes and 126KB until OOM
via Stack Overflow by sunny
, 2 years ago
Failed to allocate a 7128012 byte allocation with 5880016 free bytes and 5MB until OOM
via Stack Overflow by Anonymous
, 11 months ago
Failed to allocate a 65351068 byte allocation with 16777120 free bytes and 57MB until OOM
via Stack Overflow by Judah Irani
, 8 months ago
Failed to allocate a 286654476 byte allocation with 4896858 free bytes and 248MB until OOM
via Stack Overflow by user3564900
, 1 year ago
Failed to allocate a 603288012 byte allocation with 1569794 free bytes and 61MB until OOM
java.lang.OutOfMemoryError: Failed to allocate a 26211852 byte allocation with 16777216 free bytes and 21MB until OOM	at dalvik.system.VMRuntime.newNonMovableArray(VMRuntime.java)	at android.graphics.BitmapFactory.nativeDecodeAsset(BitmapFactory.java)	at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:856)	at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:675)	at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:2228)	at android.content.res.Resources.loadDrawableForCookie(Resources.java:4211)	at android.content.res.Resources.loadDrawable(Resources.java:4085)	at android.content.res.Resources.getDrawable(Resources.java:2005)	at android.content.res.Resources.getDrawable(Resources.java:1987)	at android.content.res.Resources.getDrawable(Resources.java:1961)	at com.facebook.drawee.generic.GenericDraweeHierarchyInflater.getDrawable(SourceFile:227)	at com.facebook.drawee.generic.GenericDraweeHierarchyInflater.updateBuilder(SourceFile:116)	at com.facebook.drawee.generic.GenericDraweeHierarchyInflater.inflateBuilder(SourceFile:77)	at com.facebook.drawee.view.GenericDraweeView.inflateHierarchy(SourceFile:58)	at com.facebook.drawee.view.GenericDraweeView.(SourceFile)	at com.facebook.drawee.view.SimpleDraweeView.(SourceFile)	at java.lang.reflect.Constructor.newInstance(Constructor.java)	at android.view.LayoutInflater.createView(LayoutInflater.java:631)	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776)	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716)	at android.view.LayoutInflater.rInflate(LayoutInflater.java:847)	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810)	at android.view.LayoutInflater.rInflate(LayoutInflater.java:855)	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810)	at android.view.LayoutInflater.rInflate(LayoutInflater.java:855)	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810)	at android.view.LayoutInflater.inflate(LayoutInflater.java:527)	at android.view.LayoutInflater.inflate(LayoutInflater.java:429)	at com.xxx.xxxFragment.onCreateView(SourceFile:130)	at android.support.v4.app.Fragment.performCreateView(SourceFile:1962)	at android.support.v4.app.FragmentManagerImpl.moveToState(SourceFile:1067)	at android.support.v4.app.FragmentManagerImpl.attachFragment(SourceFile:1426)	at android.support.v4.app.BackStackRecord.run(SourceFile:728)	at android.support.v4.app.FragmentManagerImpl.execPendingActions(SourceFile:1613)	at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(SourceFile:570)	at android.support.v4.app.FragmentPagerAdapter.finishUpdate(SourceFile:141)	at android.support.v4.view.ViewPager.populate(SourceFile:1106)	at android.support.v4.view.ViewPager.populate(SourceFile:952)	at android.support.v4.view.ViewPager.onMeasure(SourceFile:1474)	at android.view.View.measure(View.java:20151)	at android.widget.LinearLayout.measureVertical(LinearLayout.java:900)	at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)	at android.view.View.measure(View.java:20151)	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)	at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)	at android.view.View.measure(View.java:20151)	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464)	at android.widget.LinearLayout.measureVertical(LinearLayout.java:747)	at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)	at android.view.View.measure(View.java:20151)	at android.support.v4.widget.DrawerLayout.onMeasure(SourceFile:940)	at android.view.View.measure(View.java:20151)	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)	at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)	at android.support.v7.widget.ContentFrameLayout.onMeasure(SourceFile:135)	at android.view.View.measure(View.java:20151)	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464)	at android.widget.LinearLayout.measureVertical(LinearLayout.java:747)	at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)	at android.view.View.measure(View.java:20151)	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)	at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)	at android.view.View.measure(View.java:20151)	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464)	at android.widget.LinearLayout.measureVertical(LinearLayout.java:747)	at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)	at android.view.View.measure(View.java:20151)	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)	at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)	at com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:3158)	at android.view.View.measure(View.java:20151)	at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2594)	at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1549)	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1841)	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1437)	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7403)	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:920)	at android.view.Choreographer.doCallbacks(Choreographer.java:695)	at android.view.Choreographer.doFrame(Choreographer.java:631)	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906)	at android.os.Handler.handleCallback(Handler.java:739)	at android.os.Handler.dispatchMessage(Handler.java:95)	at android.os.Looper.loop(Looper.java:158)	at android.app.ActivityThread.main(ActivityThread.java:7229)	at java.lang.reflect.Method.invoke(Method.java)	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)