java.lang.OutOfMemoryError

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
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

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

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

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

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

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

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

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

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • OutOfMemoryError and Lag
    via GitHub by Pika3323
    ,
  • OutOfMemoryError and Lag
    via GitHub by Pika3323
    ,
  • Android Gmaps API error
    via Stack Overflow by Christine Jade Saturno Padullo
    ,
  • Failed to allocate size
    via Stack Overflow by Jason
    ,
  • OutOfMemoryError when loading animations
    via Stack Overflow by JDFuzyll
    ,
    • java.lang.OutOfMemoryError: Failed to allocate a 8876812 byte allocation with 7873968 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: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(ResourcesWrapper.java:133) at android.content.Context.getDrawable(Context.java:464) at android.support.v4.content.ContextCompatApi21.getDrawable(ContextCompatApi21.java:26) at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:352) at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:193) at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:181) at android.support.v7.widget.AppCompatImageHelper.setImageResource(AppCompatImageHelper.java:72) at android.support.v7.widget.AppCompatImageView.setImageResource(AppCompatImageView.java:71) at appinventor.ai_itiel_maimon.Rubiks_cube.S7.onCreateView(S7.java:28) at android.support.v4.app.Fragment.performCreateView(Fragment.java:2074) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104) at android.support.v4.app.FragmentManagerImpl.attachFragment(FragmentManager.java:1464) at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:748) at android.support.v4.app.FragmentManagerImpl.execSingleAction(FragmentManager.java:1632) at android.support.v4.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:637) at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:143) at android.support.v4.view.ViewPager.populate(ViewPager.java:1235) at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:666) at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:628) at android.support.v4.view.ViewPager.setCurrentItem(ViewPager.java:609) at android.support.design.widget.TabLayout$ViewPagerOnTabSelectedListener.onTabSelected(TabLayout.java:2168) at android.support.design.widget.TabLayout.dispatchTabSelected(TabLayout.java:1157) at android.support.design.widget.TabLayout.selectTab(TabLayout.java:1151) at android.support.design.widget.TabLayout.selectTab(TabLayout.java:1124) at android.support.design.widget.TabLayout$Tab.select(TabLayout.java:1419) at android.support.design.widget.TabLayout$TabView.performClick(TabLayout.java:1524) at android.view.View$PerformClick.run(View.java:22526) 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:7229) 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)

    Users with the same issue

    Agócs Tamás
    2 times, last one,
    Aria Pahlavan
    73 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Pawan
    4 times, last one,
    68 more bugmates