java.lang.OutOfMemoryError: Failed to allocate a 416160012 byte allocation with 11861984 free bytes and 239MB until OOM

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

,
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

,
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

Solutions on the web

via Stack Overflow by Jason
, 11 months ago
Failed to allocate a 416160012 byte allocation with 11861984 free bytes and 239MB until OOM
via Stack Overflow by S Kharbanda
, 10 months ago
Failed to allocate a 52920012 byte allocation with 4194304 free bytes and 31MB until OOM
via Stack Overflow by vinlord
, 9 months ago
Failed to allocate a 357739212 byte allocation with 3485344 free bytes and 251MB until OOM
via Stack Overflow by Daniela RodríguezP
, 6 months ago
Failed to allocate a 81000012 byte allocation with 16777216 free bytes and 28MB until OOM
via Stack Overflow by Soumyadeep Das
, 2 months ago
Failed to allocate a 132710412 byte allocation with 4185304 free bytes and 108MB until OOM
via Stack Overflow by Luke The Dal Zot
, 7 months ago
Failed to allocate a 9000012 byte allocation with 204192 free bytes and 199KB until OOM
java.lang.OutOfMemoryError: Failed to allocate a 416160012 byte allocation with 11861984 free bytes and 239MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:620)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:455)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:1152)
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:855)
at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:706)
at android.support.v4.content.ContextCompatApi21.getDrawable(ContextCompatApi21.java:26)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:202)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:192)
at android.support.v7.widget.AppCompatImageHelper.loadFromAttributes(AppCompatImageHelper.java:49)
at android.support.v7.widget.AppCompatImageView.(AppCompatImageView.java:65)
at android.support.v7.widget.AppCompatImageView.(AppCompatImageView.java:53)
at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:106)
at android.support.v7.app.AppCompatDelegateImplV7.createView(AppCompatDelegateImplV7.java:980)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:769)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280)
at com.sp.ez_mart.Store_Layout.onCreate(Store_Layout.java:15)
at android.app.Activity.performCreate(Activity.java:6754)

Users with the same issue

3 times, 2 months ago
8 times, 9 months ago
24 times, 1 year ago
2 times, 1 year ago
15 times, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.