Mytilene
Aspiring developer
Profile
Posts: 13
Reg: Apr 04, 2013
Ulaanbaatar
4,230
09/09/14 06:46 PM (9 years ago)

Android runtime error

I get following error when I run app on any samsung device, also on android 4.3. 09-09 21:35:52.567: I/dalvikvm(761): at com.chinggisbond.BT_activity_base$BackgroundImageWorkerThread.run(BT_activity_base.java:701) 09-09 21:35:52.577: D/skia(761): --- allocation failed for scaled bitmap 09-09 21:35:52.577: W/dalvikvm(761): threadid=12: thread exiting with uncaught exception (group=0x41465700) 09-09 21:35:52.607: E/AndroidRuntime(761): FATAL EXCEPTION: Thread-78 09-09 21:35:52.607: E/AndroidRuntime(761): java.lang.OutOfMemoryError 09-09 21:35:52.607: E/AndroidRuntime(761): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) 09-09 21:35:52.607: E/AndroidRuntime(761): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:503) 09-09 21:35:52.607: E/AndroidRuntime(761): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:356) 09-09 21:35:52.607: E/AndroidRuntime(761): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:800) 09-09 21:35:52.607: E/AndroidRuntime(761): at android.content.res.Resources.loadDrawable(Resources.java:2105) 09-09 21:35:52.607: E/AndroidRuntime(761): at android.content.res.Resources.getDrawable(Resources.java:695) 09-09 21:35:52.607: E/AndroidRuntime(761): at com.chinggisbond.BT_fileManager.getDrawableByName(BT_fileManager.java:263) 09-09 21:35:52.607: E/AndroidRuntime(761): at com.chinggisbond.BT_activity_base$BackgroundImageWorkerThread.run(BT_activity_base.java:701) 09-09 21:35:56.007: D/dalvikvm(761): GC_FOR_ALLOC freed 8118K, 54% free 7389K/15976K, paused 74ms, total 74ms 09-09 21:35:56.057: I/Process(761): Sending signal. PID: 761 SIG: 9 How to solve This?
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
09/09/14 06:55 PM (9 years ago)
Out of memory error - looks like you have too large of images in your app. This is a common problem with Android - it only allows a limited about of memory for each app on the device, regardless of how much overall memory the device has. Try reducing the quality of your images, and having different version of your images in the various resolution folders (drawable, drawable-hdpi, etc).
 
Mytilene
Aspiring developer
Profile
Posts: 13
Reg: Apr 04, 2013
Ulaanbaatar
4,230
like
09/09/14 09:41 PM (9 years ago)
ok thanks. I'll try
 

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.