java.lang.OutOfMemoryError

Failed to allocate a 23040012 byte allocation with 16777120 free bytes and 16MB until OOM

Samebug tips4

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

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 23040012 byte allocation with 16777120 free bytes and 16MB until OOM
  • via GitHub by iceberg1369
    , 6 months ago
    Failed to allocate a 67108876 byte allocation with 4194208 free bytes and 16MB until OOM
  • via GitHub by swaheed2
    , 9 months ago
    Failed to allocate a 39474628 byte allocation with 16777216 free bytes and 16MB until OOM
  • Stack trace

    • 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)

    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

    9 times, 3 months ago
    Unknown user
    Once, 4 months ago
    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 11 months ago
    Once, 11 months ago
    73 more bugmates