的OutOfMemoryError什么增加,怎么样? [英] OutOfMemoryError what to increase and how?

查看:124
本文介绍了的OutOfMemoryError什么增加,怎么样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个很长的口子用10k的项目,并在对象上运行一个toString()时崩溃。我需要使用此输出不知。

I have a really long collection with 10k items, and when running a toString() on the object it crashes. I need to use this output somehow.

05-21 12:59:44.586: ERROR/dalvikvm-heap(6415): Out of memory on a 847610-byte allocation.
05-21 12:59:44.636: ERROR/dalvikvm(6415): Out of memory: Heap Size=15559KB, Allocated=12932KB, Bitmap Size=613KB
05-21 12:59:44.636: ERROR/AndroidRuntime(6415): Uncaught handler: thread main exiting due to uncaught exception
05-21 12:59:44.636: ERROR/AndroidRuntime(6415): java.lang.OutOfMemoryError
05-21 12:59:44.636: ERROR/AndroidRuntime(6415):     at java.lang.AbstractStringBuilder.enlargeBuffer(AbstractStringBuilder.java:97)
05-21 12:59:44.636: ERROR/AndroidRuntime(6415):     at java.lang.AbstractStringBuilder.append0(AbstractStringBuilder.java:155)
05-21 12:59:44.636: ERROR/AndroidRuntime(6415):     at java.lang.StringBuilder.append(StringBuilder.java:202)
05-21 12:59:44.636: ERROR/AndroidRuntime(6415):     at java.util.AbstractCollection.toString(AbstractCollection.java:384)

我需要一步一步地指导如何增加堆和Android应用程序。我不运行命令行。

I need step by step guide how to increase the heap for and Android application. I don't run the command line.

推荐答案

似乎有一种对Android应用程序16 MB的堆空间只能通过的改变Android的源。你的计划已经达到这个极限:内存:堆大小= 15559KB。你需要弄清楚如何降低系统的内存使用情况。一个很好的指南,这样做是这里

It seems that there is a hard limit of 16 MB heap space on Android apps that can only be worked around by altering the Android source. Your program has hit this limit: "Out of memory: Heap Size=15559KB". You'll need to figure out how to reduce your program's memory usage. A nice guide to doing this is here.

这篇关于的OutOfMemoryError什么增加,怎么样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆