java.lang.OutOfMemoryError

Failed to allocate a 4631116 byte allocation with 4380676 free bytes and 4MB until OOM

Samebug tips4

This was issue #159 in Fresco, and was fixed recently, in v1.3.0.

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

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web2788

  • Failed to allocate a 4631116 byte allocation with 4380676 free bytes and 4MB until OOM
  • Failed to allocate a 9437196 byte allocation with 4245872 free bytes and 4MB until OOM
  • via GitHub by leequarella
    , 4 months ago
    Failed to allocate a 14261772 byte allocation with 4353808 free bytes and 4MB until OOM
  • Stack trace

    • java.lang.OutOfMemoryError: Failed to allocate a 4631116 byte allocation with 4380676 free bytes and 4MB until OOM at dalvik.system.VMRuntime.newNonMovableArray(Native Method) at android.graphics.Bitmap.nativeCreate(Native Method) at android.graphics.Bitmap.createBitmap(Bitmap.java:939) at android.graphics.Bitmap.createBitmap(Bitmap.java:912) at android.graphics.Bitmap.createBitmap(Bitmap.java:879) at com.codename1.impl.android.AndroidNativeUtil.renderViewOnBitmap(AndroidNativeUtil.java:163) at com.codename1.impl.android.f$b.m_(AndroidImplementation.java:2652) at com.codename1.p.y.B(PeerComponent.java:64) at com.codename1.p.y.a(PeerComponent.java:211) at com.codename1.p.h.b(Component.java:1323) at com.codename1.p.h.d(Component.java:1297) at com.codename1.p.h.a(Component.java:1272) at com.codename1.p.i.a(Container.java:1323) at com.codename1.p.h.b(Component.java:1323) at com.codename1.p.h.d(Component.java:1297) at com.codename1.p.h.a(Component.java:1272)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Once, 11 months ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 9 months ago
    67 more bugmates