java.lang.OutOfMemoryError: Failed to allocate a 467251212 byte allocation with 13040548 free bytes and 173MB 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 Jibran Ejaz
, 9 months ago
Failed to allocate a 467251212 byte allocation with 13040548 free bytes and 173MB until OOM
via Stack Overflow by Xavier W.
, 1 year ago
Failed to allocate a 44236812 byte allocation with 8344256 free bytes and 7MB until OOM
via oneapm.com by Unknown author, 8 months ago
Failed to allocate a 4308492 byte allocation with 467872 free bytes and 456KB until OOM
via forundex.ru by Unknown author, 1 year ago
Failed to allocate a 12960012 byte allocation with 5594672 free bytes and 5MB until OOM
via Stack Overflow by Joehamir
, 5 months ago
Failed to allocate a 16468068 byte allocation with 10001484 free bytes and 9MB until OOM
via Stack Overflow by Arsham
, 1 month ago
Failed to allocate a 127829260 byte allocation with 1048480 free bytes and 94MB until OOM
java.lang.OutOfMemoryError: Failed to allocate a 467251212 byte allocation with 13040548 free bytes and 173MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:667)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:488)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:1082)
at android.content.res.Resources.loadDrawableForCookie(Resources.java:2702)
at android.content.res.Resources.loadDrawable(Resources.java:2603)
at android.content.res.HwResources.loadDrawable(HwResources.java:665)
at android.content.res.TypedArray.getDrawable(TypedArray.java:912)
at android.widget.ImageView.(ImageView.java:152)
at android.widget.ImageView.(ImageView.java:140)
at android.support.v7.widget.AppCompatImageView.(AppCompatImageView.java:57)
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:1008)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:765)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:723)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:854)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:817)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:857)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:817)
at android.view.LayoutInflater.inflate(LayoutInflater.java:534)
at android.view.LayoutInflater.inflate(LayoutInflater.java:434)
at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280)
at com.jibran.ejaz.prayertimes.MainActivity.onCreate(MainActivity.java:17)
at android.app.Activity.performCreate(Activity.java:6367)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2397)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2504)
at android.app.ActivityThread.access$900(ActivityThread.java:165)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1368)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:5546)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
6 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 1 year ago
76 more bugmates

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