Saifu
Android Fan
Profile
Posts: 46
Reg: Apr 07, 2014
MUmbai
660
03/31/15 12:06 PM (9 years ago)

App Crashing :(

I successfully created 3 apps (Android) but my first self hosted app is crashing. When I target 4.4.2 I see warning in BT Menu plugin The field ViewGroup.LayoutParams.FILL_PARENT is deprecate line 385 And when I run It on my Real device app crashes after clicking Menu button The log cat is 04-01 00:23:56.622: E/AndroidRuntime(10936): FATAL EXCEPTION: Thread-39486 04-01 00:23:56.622: E/AndroidRuntime(10936): Process: com.patrasbukhari, PID: 10936 04-01 00:23:56.622: E/AndroidRuntime(10936): java.lang.OutOfMemoryError 04-01 00:23:56.622: E/AndroidRuntime(10936): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) 04-01 00:23:56.622: E/AndroidRuntime(10936): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:587) 04-01 00:23:56.622: E/AndroidRuntime(10936): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:422) 04-01 00:23:56.622: E/AndroidRuntime(10936): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:840) 04-01 00:23:56.622: E/AndroidRuntime(10936): at android.content.res.Resources.loadDrawable(Resources.java:2192) 04-01 00:23:56.622: E/AndroidRuntime(10936): at android.content.res.Resources.loadDrawable(Resources.java:2075) 04-01 00:23:56.622: E/AndroidRuntime(10936): at android.content.res.Resources.getDrawable(Resources.java:706) 04-01 00:23:56.622: E/AndroidRuntime(10936): at com.patrasbukhari.BT_fileManager.getDrawableByName(BT_fileManager.java:263) 04-01 00:23:56.622: E/AndroidRuntime(10936): at com.patrasbukhari.BT_viewUtilities$BackgroundImageThread.run(BT_viewUtilities.java:177) please help
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
03/31/15 12:11 PM (9 years ago)
You don't need to worry about the deprecated code warning...it's just a warning saying there is a new way to do things. But it should still work. My guess is the problem is with images you are using...they may be too big from a file size perspective. I'd try and reduce their size as much as possible. I'd also put the same images in all the res > drawable folders. If you just put it in the single folder, and you run the app on a device that would draw images from one of the other folders, it'll draw it from the default folder, try to resize it for the device the app is being run on, and then present it to the user. That resizing doesn't always go so well. Let us know if that helps! Mark
 
Saifu
Android Fan
Profile
Posts: 46
Reg: Apr 07, 2014
MUmbai
660
like
03/31/15 11:35 PM (9 years ago)
Thanks A Lot GNW ! It worked like a magic......... I wonder why it was crashing I use same image sizes in my previous apps. Thanks agaian :)
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/01/15 02:52 PM (9 years ago)
Glad that it's worked out! Hard to say why it didn't work this time. Did you test it on a different device than you did your previous apps? Mark
 

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.