PictureSelector 低端机压缩5兆的图片必崩

fjaof16o  于 4个月前  发布在  其他
关注(0)|答案(1)|浏览(88)

Current use version?

当前使用的版本是多少?
demo 最新版

Will this problem occur in demo?

Demo能否复现这问题?

Describe the problem or provide an error log?

描述问题或提供错误log?
低端手机,压缩一个5mb大小的长图,必崩溃
 java.lang.OutOfMemoryError: Failed to allocate a 208929252 byte allocation with 16777216 free bytes and 161MB until OOM
        at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
        at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
        at android.graphics.BitmapFactory.decodeStreamInternal(BitmapFactory.java:650)
        at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:626)
        at top.zibin.luban.Engine.compress(Engine.java:73)
        at top.zibin.luban.Luban.compressReal(Luban.java:213)
        at top.zibin.luban.Luban.compress(Luban.java:194)
        at top.zibin.luban.Luban.access$1000(Luban.java:23)
        at top.zibin.luban.Luban$1.run(Luban.java:146)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:760)

相关问题