java.lang.OutOfMemoryError

Failed to allocate a 12695052 byte allocation with 7472568 free bytes and 7MB 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 web679

  • Stack trace

    • java.lang.OutOfMemoryError: Failed to allocate a 12695052 byte allocation with 7472568 free bytes and 7MB until OOM at dalvik.system.VMRuntime.newNonMovableArray(Native Method) at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:609) at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444) at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:988) at android.content.res.Resources.loadDrawableForCookie(Resources.java:2477) at android.content.res.Resources.loadDrawable(Resources.java:2384) at android.content.res.TypedArray.getDrawable(TypedArray.java:749) at android.view.View.<init>(View.java:3742) at android.widget.ImageView.<init>(ImageView.java:149) at android.widget.ImageView.<init>(ImageView.java:145) 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:725) at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) at android.view.LayoutInflater.inflate(LayoutInflater.java:504) at android.view.LayoutInflater.inflate(LayoutInflater.java:414) at com.example.sheikhspc.testapp.Question4.onCreateView(Question4.java:36) at android.app.Fragment.performCreateView(Fragment.java:2053) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:894) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067) at android.app.BackStackRecord.run(BackStackRecord.java:834) at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1454) at android.app.FragmentManagerImpl$1.run(FragmentManager.java:447) at android.os.Handler.handleCallback(Handler.java:746) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5356) 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:905) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)

    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

    Indri YunitaIndri Yunita
    9 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    mathan mmathan m
    Once,
    73 more bugmates