当我从网站下载大数据时,出现以下错误信息:
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
有人可以帮助我吗?
最佳答案
单个应用程序无权访问所有可用的设备内存。如果要下载大数据集,请考虑将其随身写入SD卡中,而不要尝试将其完全保存在内存中。