Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDerek Derek
8,744 Pointsjava.lang.OutOfMemoryError
Hello, I am new to Android development, and after watching a couple introduction courses here, I tried making a simple tournament app. It's not finished yet, but whenever I try to run the code on the emulator, I keep getting OutOfMemoryError. My Mac has plenty of memory left, and I'm not using large image files (about 15 images, each around 10-20KB)..
This is the log I keep getting:
java.lang.OutOfMemoryError: Failed to allocate a 64000012 byte allocation with 4194304 free bytes and 57MB until OOM
I'd appreciate any help! Thank you.
1 Answer
Aaron Arkie
5,345 PointsYou either may not have enough RAM storage, to many processes running in the background, or a bug in your program such as an infinite loop. If you're using an AVD youll need decent chunk of RAM to get it running.
Aaron Arkie
5,345 PointsAaron Arkie
5,345 PointsHow big is your RAM?