05 May 2012, 17:16

Al Ankers (5 posts)

OK, I’m on famous page 39 and I added the debug command to AndroidManifest.xml and I get this error and the program terminates. I also had the R.java dissapear and I rebuilt it before I found your solution in this web site. I played with the allocation in em22 with no different results. Can you help? I’d like to get past page 39.

08 May 2012, 20:58

Al Ankers (5 posts)

OK, I fixed the memory problem by changing the SD card size in the AVD em22. However, I get a clean compile and the program runs but nothing happens. I put in the debug statement but that was no help. I can put some breakpoints in but where.

08 May 2012, 21:12

Ed Burnette (1327 posts)

Did you specify too much memory when you created your AVD? I found several people having the same error message and they say reducing the allocation helps it:

  • http://stackoverflow.com/questions/7222906/failed-to-allocate-memory-8
  • http://stackoverflow.com/questions/5969067/android-failed-to-allocate-memory
  • http://stackoverflow.com/questions/7851811/android-failed-to-allocate-memory

Try setting device ram size to 512. You could also try an older version of the emulator, or using a virtual machine instead of an emulator.

The best solution, if you can do it, is to debug with a real phone.

  You must be logged in to comment