java.lang.OutOfMemoryError

Failed to allocate a 467251212 byte allocation with 13040548 free bytes and 173MB 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

  • via Stack Overflow by Jibran Ejaz
    ,
  • Stack trace

    • java.lang.OutOfMemoryError: Failed to allocate a 467251212 byte allocation with 13040548 free bytes and 173MB until OOM at dalvik.system.VMRuntime.newNonMovableArray(Native Method) at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:667) at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:488) at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:1082) at android.content.res.Resources.loadDrawableForCookie(Resources.java:2702) at android.content.res.Resources.loadDrawable(Resources.java:2603) at android.content.res.HwResources.loadDrawable(HwResources.java:665) at android.content.res.TypedArray.getDrawable(TypedArray.java:912) at android.widget.ImageView.<init>(ImageView.java:152) 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.AppCompatDelegateImplV7.createView(AppCompatDelegateImplV7.java:1008) at android.support.v7.app.AppCompatDelegateImplV7.onCreateView(AppCompatDelegateImplV7.java:1067) at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:765) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:723) at android.view.LayoutInflater.rInflate(LayoutInflater.java:854) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:817) at android.view.LayoutInflater.rInflate(LayoutInflater.java:857) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:817) at android.view.LayoutInflater.inflate(LayoutInflater.java:534) at android.view.LayoutInflater.inflate(LayoutInflater.java:434) at android.view.LayoutInflater.inflate(LayoutInflater.java:377) at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) at com.jibran.ejaz.prayertimes.MainActivity.onCreate(MainActivity.java:17) at android.app.Activity.performCreate(Activity.java:6367) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2397) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2504) at android.app.ActivityThread.access$900(ActivityThread.java:165) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1368) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:150) at android.app.ActivityThread.main(ActivityThread.java:5546) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684)

    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

    Unknown visitor
    Unknown visitorOnce,
    Ranjana DangolRanjana Dangol
    6 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    tone5992tone5992
    Once,
    73 more bugmates