Open nuxwork opened 5 years ago
我也遇到了OOM,我压缩的文件是5个,报错如下: java.lang.OutOfMemoryError: Failed to allocate a 2073612 byte allocation with 1164040 free bytes and 1136KB until OOM at dalvik.system.VMRuntime.newNonMovableArray(Native Method) at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) at android.graphics.BitmapFactory.decodeStreamInternal(BitmapFactory.java:677) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:653) at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:433) at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:459) at com.wgd.gdcp.gdcplibrary.GDBitmapUtil.bitmapDegree(GDBitmapUtil.java:68) at com.wgd.gdcp.gdcplibrary.GDCompressImageS$100000000.run(GDCompressImageS.java:102) at java.lang.Thread.run(Thread.java:818)
由于前段时间比较忙,而且公司使用一直没有问题,所以这个项目一直没有优化。现在终于抽出时间来搞了一下。目前1.0.10版本已经提供多种方式优化OOM问题。欢迎继续使用、讨论。