Search code examples
androidmemory-managementlogcatdalvik

byte external allocation too large for this process", "VM won't let us allocate bytes"


I'm using Android 2.2 and, when I'm trying to return from second activity to first activity by pressing a back button, the app crashes and produces a logcat error:

byte external allocation too large for this process,
    VM won't let us allocate bytes

Can anyone help me?


Solution

  • It seems you are running out-of-memory, so the activity cannot reinit. Please check this link for tracking you memory in Android - http://android-developers.blogspot.com/2011/03/memory-analysis-for-android.html

    However, if you'll paste some more logs and code - it can help to determine exact problem.

    Good luck