java.lang.OutOfMemoryError

Failed to allocate a 37748748 byte allocation with 16777216 free bytes and 35MB 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


rafaelrafael

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


rafaelrafael

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

Solutions on the web657

  • via GitHub by Pika3323
    ,
  • via GitHub by Pika3323
    ,
  • Stack trace

    • java.lang.OutOfMemoryError: Failed to allocate a 37748748 byte allocation with 16777216 free bytes and 35MB until OOM at dalvik.system.VMRuntime.newNonMovableArray(Native Method) at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:856) at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:675) at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:2228) at android.content.res.Resources.loadDrawableForCookie(Resources.java:4211) at android.content.res.Resources.loadDrawable(Resources.java:4085) at android.content.res.Resources.getDrawable(Resources.java:2005) at android.content.res.Resources.getDrawable(Resources.java:1987) at android.support.v7.widget.ResourcesWrapper.getDrawable(Unknown Source) at android.content.Context.getDrawable(Context.java:464) at android.support.v4.content.ContextCompatApi21.getDrawable(Unknown Source) at android.support.v4.content.ContextCompat.getDrawable(Unknown Source) at android.support.v7.widget.AppCompatDrawableManager.getDrawable(Unknown Source) at android.support.v7.widget.AppCompatDrawableManager.getDrawable(Unknown Source) at android.support.v7.widget.AppCompatImageHelper.setImageResource(Unknown Source) at android.support.v7.widget.AppCompatImageView.setImageResource(Unknown Source) at com.heinrichreimersoftware.materialintro.b.f.onCreateView(Unknown Source) at android.support.v4.app.Fragment.performCreateView(Unknown Source) at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source) at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source) at android.support.v4.app.BackStackRecord.run(Unknown Source) at android.support.v4.app.FragmentManagerImpl.execSingleAction(Unknown Source) at android.support.v4.app.BackStackRecord.commitNowAllowingStateLoss(Unknown Source) at android.support.v4.app.FragmentStatePagerAdapter.finishUpdate(Unknown Source) at com.heinrichreimersoftware.materialintro.view.e.finishUpdate(Unknown Source) at android.support.v4.view.ViewPager.populate(Unknown Source) at android.support.v4.view.ViewPager.populate(Unknown Source) at android.support.v4.view.ViewPager$3.run(Unknown Source) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:920) at android.view.Choreographer.doCallbacks(Choreographer.java:695) at android.view.Choreographer.doFrame(Choreographer.java:628) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7224) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

    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

    Agócs TamásAgócs Tamás
    2 times, last one
    Aria PahlavanAria Pahlavan
    73 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    PawanPawan
    4 times, last one
    68 more bugmates