0

in my simple app i am using 6 buttons and setting background with png.

Button btnGadgetmusic   = (Button) findViewById(R.id.gadgetmusic);
btnGadgetmusic.setBackgroundResource(R.drawable.btnselectedsong);

minimum size of png is 13.5K and maximum size is 40K. When ever i try to run this app on emulator with version 2.3, i get "external allocation too large for this process" and interestningly if i run on honeycomb or on ICS then there is no problem.

So i am confused what should i do, should i ignore it, if not, do we have some better solution for that.

looking for your reply

EDIT Log File added

I/dalvikvm-heap(4190): Clamp target GC heap from 25.494MB to 24.000MB

D/dalvikvm(4190): GC_FOR_MALLOC freed <1K, 51% free 2647K/5379K, external 18806K/20812K, paused 28ms

D/dalvikvm(4190): GC_EXTERNAL_ALLOC freed <1K, 51% free 2647K/5379K, external 18806K/20812K, paused 49ms

I/dalvikvm-heap(4190): Clamp target GC heap from 25.833MB to 24.000MB

D/dalvikvm(4190): GC_FOR_MALLOC freed 0K, 51% free 2647K/5379K, external 19153K/20812K, paused 25ms

D/dalvikvm(4190): GC_EXTERNAL_ALLOC freed <1K, 51% free 2657K/5379K, external 19153K/20812K, paused 56ms

I/dalvikvm-heap(4190): Clamp target GC heap from 25.852MB to 24.000MB

D/dalvikvm(4190): GC_FOR_MALLOC freed <1K, 51% free 2657K/5379K, external 19162K/20812K, paused 24ms

D/dalvikvm(4190): GC_EXTERNAL_ALLOC freed 4K, 51% free 2671K/5379K, external 19162K/20812K, paused 69ms

I/dalvikvm-heap(4190): Clamp target GC heap from 25.887MB to 24.000MB

D/dalvikvm(4190): GC_FOR_MALLOC freed 0K, 51% free 2671K/5379K, external 19184K/20812K, paused 28ms

W/KeyCharacterMap(4190): No keyboard for id 0

W/KeyCharacterMap(4190): Using default keymap: /system/usr/keychars/qwerty.kcm.bin

W/KeyCharacterMap(4190): No keyboard for id 0

W/KeyCharacterMap(4190): Using default keymap: /system/usr/keychars/qwerty.kcm.bin

I/dalvikvm-heap(4190): Clamp target GC heap from 25.913MB to 24.000MB

D/dalvikvm(4190): GC_CONCURRENT freed 16K, 50% free 2697K/5379K, external 19184K/20812K, paused 
3ms+35ms

I/dalvikvm-heap(4190): Clamp target GC heap from 25.942MB to 24.000MB

D/dalvikvm(4190): GC_CONCURRENT freed 13K, 50% free 2727K/5379K, external 19184K/20812K, paused 3ms+3ms

D/dalvikvm(4190): GC_EXTERNAL_ALLOC freed 2K, 50% free 2724K/5379K, external 19184K/20812K, paused 65ms

E/dalvikvm-heap(4190): 20736-byte external allocation too large for this process.

I/dalvikvm-heap(4190): Clamp target GC heap from 25.939MB to 24.000MB

E/GraphicsJNI(4190): VM won't let us allocate 20736 bytes

D/dalvikvm(4190): GC_FOR_MALLOC freed 0K, 50% free 2724K/5379K, external 19184K/20812K, paused 38ms

D/skia(4190): --- decoder->decode returned false

D/AndroidRuntime(4190): Shutting down VM

W/dalvikvm(4190): threadid=1: thread exiting with uncaught exception (group=0x40015560)

E/AndroidRuntime(4190): FATAL EXCEPTION: main

E/AndroidRuntime(4190): java.lang.OutOfMemoryError: bitmap size exceeds VM budget
4

0 回答 0