我的应用程序出现“外部分配对于此进程而言太大”错误。一次有很多:
11-16 10:56:59.230: ERROR/dalvikvm-heap(2875): 1303680-byte external allocation too large for this process.
11-16 10:56:59.230: ERROR/GraphicsJNI(2875): VM won't let us allocate 1303680 bytes
11-16 10:56:59.230: ERROR/dalvikvm-heap(2875): 1536000-byte external allocation too large for this process.
11-16 10:56:59.230: ERROR/GraphicsJNI(2875): VM won't let us allocate 1536000 bytes
它们似乎是在加载大位图后渲染布局时生成的。但是,在解码位图时不会产生错误。
如何调试这些错误?还有其他指示吗?
最佳答案
adamp 的评论是我特定情况下的答案:
The framework will often capture views onscreen into temporary bitmaps for drawing performance. It looks like your app is pushing right up against its memory limit already and this bumps it over. Take a look at the other suggestions for limiting your app's memory usage.
关于android - 对于 Android 中的此进程,外部分配太大,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4193917/