FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
10/28/14 02:51 AM (9 years ago)

Problem with app crashing

hi guys im having problem with my android app crashing, heres the error code, all the images in the drawable folder have been checked and double checked, this seams to be happening on all my android apps, with the app crashing, my ios is fine, java.lang.OutOfMemoryError at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:596) at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444) at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:817) at android.content.res.Resources.loadDrawable(Resources.java:2854) at android.content.res.Resources.getDrawable(Resources.java:1521) at com.buildingregs.BT_fileManager.getDrawableByName(BT_fileManager.java:263) at com.buildingregs.WB_rowImageMenu$ChildItemAdapter.getView(WB_rowImageMenu.java:681)
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
10/28/14 05:35 AM (9 years ago)
Have you tried contacting the plugin maker? Have you edited the code in any way?
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
10/28/14 06:10 AM (9 years ago)
no i havnt, on both, as i dont like to bother them because 99.9 percent of the time its me not doing something right, its normally the images with android that cause problems, was just wondering if there was anything in the error code above that ive missed . cheers sean
 
GilbertAZ
Aspiring developer
Profile
Posts: 37
Reg: Jul 16, 2012
Arizona
2,820
like
10/28/14 08:25 AM (9 years ago)
I'm having the same issue. I've found a few forum discussions around reducing the file size and dimension of your images. Also, a suggestions to put images in all of the res -> drawable* folders. https://www.buzztouch.com/forum/thread.php?tid=574E11C5613CC55EF319FD2 https://www.buzztouch.com/forum/thread.php?tid=1604638E3806619F5921D58 I'm in the process of reducing my images to 800 x 375 for my Menu w/ Images. Only reason why I'm using that dimension is because Android doesn't crash with that size, it does with larger images. I'll repost with my results. Wish me luck. :-)
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
10/28/14 08:44 AM (9 years ago)
good luck dude, keep me posted, what ive found today is on larger screen devices my app works fine, the issue of crashing is only happening on smaller screens, let me know how you find reducing the image size dude, thanks sean
 
GilbertAZ
Aspiring developer
Profile
Posts: 37
Reg: Jul 16, 2012
Arizona
2,820
like
10/28/14 08:49 AM (9 years ago)
Yes, I've concluded that larger screens worked well with no crashes ... smaller screens crashed all the time. Wish I knew that earlier before making it available. Haha Ok, i'm almost done resigning and i'll test here shortly. Standby.
 
GilbertAZ
Aspiring developer
Profile
Posts: 37
Reg: Jul 16, 2012
Arizona
2,820
like
10/28/14 09:41 AM (9 years ago)
Sean @funkymonkey I had success with adjusting my images down to 800 x 375 for my header images using the Menu w/ Images plugin. Once I did that, I then copied all of my images (except icon.png) I had in res -> drawable to all the other res -> drawable* folders (except the drawable-xhdpi .. that folder was empty to begin with). Again, leave the original icon.png file in their respected folder. I then exported my project, signed to an .APK file and emailed it to myself, installed and the crashes I had repeatedly before were no more. I'll keep poking around to see if I can get it to crash, but there has been some huge improvements in performance. Let me know how it goes for you! Good luck!
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/28/14 10:45 AM (9 years ago)
I've seen this issue as well, and I put my drawable images in ALL the drawable folders. I use the same images...I don't worry about resizing them. All seems well after that. Mark
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
10/29/14 01:52 AM (9 years ago)
the only problem i have with putting all images in all folders is my apps are huge in content average 3000 screens, so my images are around 9mb nothing over 200kb, so that would increase my app size from 10mb to 40 mb, wish there was an easier option, keep me posted on your progress guys and thanks for the feedback. sean
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
10/29/14 06:06 AM (9 years ago)
This is definitely an issue of images being too large. It's my number one complaint about Android frankly. I've had a single image with a size of about 200kb crash an app before. It almost never happens with iOS.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.