Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
please I'm having these error on my app... and i don't know why.. here's my LogCat:
java.lang.OutOfMemoryError at android.graphics.BitmapFactory.nativeDecodeByteArray(Native Method) at android.graphics.BitmapFactory.decodeByteArray(BitmapFactory.java:551) at com.example.andrey.login.ImageResizer.resizeImage(ImageResizer.java:28) at com.example.andrey.login.ImageResizer.resizeImageMaintainAspectRatio(ImageResizer.java:57) at com.example.andrey.login.FileHelper.reduceImageForUpload(FileHelper.java:67) at com.example.andrey.login.RecipientsActivity.createMessage(RecipientsActivity.java:143) at com.example.andrey.login.RecipientsActivity.onOptionsItemSelected(RecipientsActivity.java:101)
Adrian Randall4,807 Points
How big is your image?
It may not have enough memory allocated depending on how you setup or what your environment is. Or it could be a loop or anything...paste your code from where it's happening
it was 2.6 MB
Ok now I get it, but my question is how apps like Whatsapp can send and retrieve an image that big?
ok ok thanks man!!! know I understand!!!! God Bless you man!!