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 hiteshsahu
, 1 year ago
Failed to allocate a 23040012 byte allocation with 16777120 free bytes and 16MB until OOM
via Stack Overflow by Adnan Sheikh
, 1 year ago
Failed to allocate a 12695052 byte allocation with 7472568 free bytes and 7MB until OOM
via Stack Overflow by Akshay Cj
, 2 years ago
Failed to allocate a 426688012 byte allocation with 1036624 free bytes and 95MB until OOM
via Stack Overflow by Rohit_Ramkumar
, 2 years ago
Failed to allocate a 1508952 byte allocation with 56504 free bytes and 55KB until OOM
via Stack Overflow by GINCHER
, 2 years ago
Failed to allocate a 86252412 byte allocation with 1048576 free bytes and 63MB until OOM
java.lang.OutOfMemoryError: Failed to allocate a 23040012 byte allocation with 16777120 free bytes and 16MB until OOM at dalvik.system.VMRuntime.newNonMovableArray(Native Method) at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:837) at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:656) at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:1037) at android.content.res.Resources.loadDrawableForCookie(Resources.java:4037) at android.content.res.Resources.loadDrawable(Resources.java:3910) at android.content.res.TypedArray.getDrawable(TypedArray.java:776) at android.view.View.<init>(View.java:4001) at android.widget.ImageView.<init>(ImageView.java:144) at android.widget.ImageView.<init>(ImageView.java:140) at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:57) at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:53) at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:106) at android.support.v7.app.AppCompatDelegateImplV9.createView(AppCompatDelegateImplV9.java:1013) at android.support.v7.app.AppCompatDelegateImplV9.onCreateView(AppCompatDelegateImplV9.java:1072) at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:732) at android.view.LayoutInflater.rInflate(LayoutInflater.java:813) at android.view.LayoutInflater.inflate(LayoutInflater.java:511) at android.view.LayoutInflater.inflate(LayoutInflater.java:415) at com.c2h5oh.beer.view.adapter.SongPagerAdapter.instantiateItem(SongPagerAdapter.java:46) at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:1006) at android.support.v4.view.ViewPager.populate(ViewPager.java:1154) at android.support.v4.view.ViewPager.populate(ViewPager.java:1088) at android.support.v4.view.ViewPager.setAdapter(ViewPager.java:542) at com.c2h5oh.beer.view.activity.AudioPlayerActivity.addViewListeners(AudioPlayerActivity.java:331) at com.c2h5oh.beer.view.activity.AudioPlayerActivity.access$800(AudioPlayerActivity.java:60) at com.c2h5oh.beer.view.activity.AudioPlayerActivity$14.onSuccess(AudioPlayerActivity.java:560) at com.c2h5oh.beer.domain.OfflineMediaProvider.MediaHost.onPostExecute(MediaHost.java:64) at com.c2h5oh.beer.domain.OfflineMediaProvider.MediaHost.onPostExecute(MediaHost.java:10) at android.os.AsyncTask.finish(AsyncTask.java:636) at android.os.AsyncTask.access$500(AsyncTask.java:177) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:653) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6917) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)