我正在开发一个Android应用程序,有时会出现类似于以下内容的错误:
11-21 16:03:15.219:E / dalvikvm(17170):adjustAdaptiveCoef max = 4194304,min = 1048576,ut = 568 11-21 16:03:16.212:E / dalvikvm(17170):adjustAdaptiveCoef max = 4194304,min = 1048576,ut = 568 11-21 16:03:17.649:E / dalvikvm(17170):adjustAdaptiveCoef max = 4194304,min = 1048576,ut = 568
有谁知道他们的意思,或者他们是否有任何顾虑?
答案 0 :(得分:3)
该错误似乎与Dalvik VM的out of memory
条件有关。发生此错误的最常见原因是您(或操作系统)处理位图解码时。
一般来说,如果你的应用程序一次不处理大量图像(即:GridView
图像),你就不应该特别注意这些错误。
资料来源:我无法找到任何官方文件。
编辑:这是典型的堆栈跟踪,导致OutOfMemory错误。
11-20 09:06:59.122: E/dalvikvm(6924): adjustAdaptiveCoef max=6291456, min=1572864, ut=368
11-20 09:06:59.192: E/dalvikvm(6924): adjustAdaptiveCoef max=8388608, min=2097152, ut=256
11-20 09:06:59.452: E/dalvikvm(6924): adjustAdaptiveCoef max=4194304, min=1048576, ut=568
11-20 09:06:59.483: E/dalvikvm(6924): adjustAdaptiveCoef max=6291456, min=1572864, ut=368
11-20 09:06:59.483: E/dalvikvm-heap(6924): Out of memory on a 4088500-byte allocation.
11-20 09:06:59.503: E/AndroidRuntime(6924): FATAL EXCEPTION: main
11-20 09:06:59.503: E/AndroidRuntime(6924): java.lang.OutOfMemoryError
11-20 09:06:59.503: E/AndroidRuntime(6924): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
11-20 09:06:59.503: E/AndroidRuntime(6924): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:596)
11-20 09:06:59.503: E/AndroidRuntime(6924): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444)
11-20 09:06:59.503: E/AndroidRuntime(6924): at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:472)
11-20 09:06:59.503: E/AndroidRuntime(6924): at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:502)
11-20 09:06:59.503: E/AndroidRuntime(6924): at com.myapp. ...