【发布时间】:2012-02-28 14:50:03
【问题描述】:
我正在尝试使用四个 1024 x 1024 的位图,我需要在内存中有四个,因为我正在创建一个必须在横向模式下显示四个可缩放位图的画廊。
它在 Motorola Droid 2.2.3 上运行,但在 Galaxy spica (2.1) 上运行失败。这是我在 spica 上遇到的例外情况:
02-28 15:45:25.963: ERROR/dalvikvm-heap(17109): 4194304-byte external allocation too large for this process.
02-28 15:45:25.968: ERROR/(17109): VM won't let us allocate 4194304 bytes
02-28 15:45:25.973: DEBUG/AndroidRuntime(17109): Shutting down VM
02-28 15:45:25.973: WARN/dalvikvm(17109): threadid=3: thread exiting with uncaught exception (group=0x4001b180)
02-28 15:45:25.973: ERROR/AndroidRuntime(17109): Uncaught handler: thread main exiting due to uncaught exception
02-28 15:45:25.988: ERROR/AndroidRuntime(17109): java.lang.OutOfMemoryError: bitmap size exceeds VM budget
如何解决?
谢谢
【问题讨论】:
标签: android