java.lang.OutOfMemoryError: Failed to allocate a 4994508 byte allocation with 1481188 free bytes and 1446KB 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

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

,
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 GitHub by EfiMIsh
, 1 year ago
Failed to allocate a 4994508 byte allocation with 1481188 free bytes and 1446KB until OOM
via GitHub by m-abboud
, 10 months ago
Failed to allocate a 10690572 byte allocation with 6103696 free bytes and 5MB until OOM
via GitHub by huhuanhuan
, 1 year ago
Failed to allocate a 3240012 byte allocation with 2370308 free bytes and 2MB until OOM
via GitHub by nitishhhh3
, 4 months ago
Failed to allocate a 4170132 byte allocation with 3545088 free bytes and 3MB until OOM --
via GitHub by jaredsburrows
, 1 year ago
Failed to allocate a 4842156 byte allocation with 2271684 free bytes and 2MB until OOM
via GitHub by Dokuzov
, 2 years ago
Failed to allocate a 4227276 byte allocation with 2371664 free bytes and 2MB until OOM
java.lang.OutOfMemoryError: Failed to allocate a 4994508 byte allocation with 1481188 free bytes and 1446KB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:817)
at android.graphics.Bitmap.createBitmap(Bitmap.java:794)
at com.github.mikephil.charting.renderer.LineChartRenderer.drawData(LineChartRenderer.java:85)
at com.github.mikephil.charting.renderer.CombinedChartRenderer.drawData(CombinedChartRenderer.java:86)
at com.github.mikephil.charting.charts.BarLineChartBase.onDraw(BarLineChartBase.java:213)
at android.view.View.draw(View.java:15114)

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.