安卓java.lang.OutOfMemoryError [英] android java.lang.OutOfMemoryError

查看:142
本文介绍了安卓java.lang.OutOfMemoryError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有,  当我从网站上下载大量的数据,我得到这个错误信息:

all, when i download large data from website, i got this error information:

I/global  (20094): Default buffer size used in BufferedInputStream constructor.
It would be better to be explicit if an 8k buffer is required.
D/dalvikvm(20094): GC freed 6153 objects / 3650840 bytes in 335ms
I/dalvikvm-heap(20094): Forcing collection of SoftReferences for 3599051-byte al
location
D/dalvikvm(20094): GC freed 320 objects / 11400 bytes in 144ms
E/dalvikvm-heap(20094): Out of memory on a 3599051-byte allocation.
I/dalvikvm(20094): "Thread-9" prio=5 tid=17 RUNNABLE
I/dalvikvm(20094):   | group="main" sCount=0 dsCount=0 s=0 obj=0x439b9480
I/dalvikvm(20094):   | sysTid=25762 nice=0 sched=0/0 handle=4065496

有人能帮助我吗?

anyone can help me?

推荐答案

个别应用程序不能访问到所有可用的设备内存。如果您正在下载一个大型数据集,建议其写入SD卡,当您去,而不是试图抓住它完全在内存中。

Individual apps do not have access to all available device memory. If you're downloading a large data set consider writing it to the SD card as you go rather than trying to hold it entirely in memory.

这篇关于安卓java.lang.OutOfMemoryError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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