我正在致力于基于大量位图的应用程序,现在问题在于,在应用程序测试期间,我在某些设备上运行时异常。基于位图的应用程序运行时间VM预算异常
这可能是由于位图大小超过了VM预算。
现在的问题是,我不能减少在Application.so中使用位图什么是可能的解决方案。
我曾尝试下面的链接,但没有成功。
http://voices.yahoo.com/android-virtual-machine-vm-out-memory-error-7342266.html
请帮助我。
我正在致力于基于大量位图的应用程序,现在问题在于,在应用程序测试期间,我在某些设备上运行时异常。基于位图的应用程序运行时间VM预算异常
这可能是由于位图大小超过了VM预算。
现在的问题是,我不能减少在Application.so中使用位图什么是可能的解决方案。
我曾尝试下面的链接,但没有成功。
http://voices.yahoo.com/android-virtual-machine-vm-out-memory-error-7342266.html
请帮助我。
This Happens because calling invalidate() just redraw same bitmaps on to the canvas..
use garbage collector just try to free memory when these bitmap getting overdraw this
might help you...:-)
不使用时回收位图。压缩位图以减少内存使用量。看看这个链接。 http://developer.android.com/training/displaying-bitmaps/load-bitmap.html。
使用MAT分析器检查位图使用了多少内存。
检查链接。谈论内存管理以及如何使用MAT来查找内存泄漏。 http://www.youtube.com/watch?v=_CruQY55HOk。
尝试压缩btimap以使用更少的内存。
发布导致问题的代码分支 – DjHacktorReborn 2013-03-09 05:45:56