Open JsonWong87 opened 6 years ago
不断的循环压缩就出现OOM了 Luban.compress(this, filesLi).setCompressFormat(Bitmap.CompressFormat.JPEG).setMaxHeight(1920).setMaxWidth(1080).setMaxSize(500) .putGear(Luban.CUSTOM_GEAR) .asListObservable() .subscribe(new Consumer<List>() { @Override public void accept(List files) throws Exception { int size = files.size(); while (size-- > 0) { filesList.add(files.get(size)); if(size == 0) { uploadImg2(filesList);
} } } }, new Consumer<Throwable>() { @Override public void accept(Throwable throwable) throws Exception { throwable.printStackTrace(); dialog.cancel(); } });
java.lang.OutOfMemoryError: Failed to allocate a 24 byte allocation with 0 free bytes and 3GB until OOM
不断的循环压缩就出现OOM了 Luban.compress(this, filesLi).setCompressFormat(Bitmap.CompressFormat.JPEG).setMaxHeight(1920).setMaxWidth(1080).setMaxSize(500) .putGear(Luban.CUSTOM_GEAR) .asListObservable() .subscribe(new Consumer<List>() {
@Override
public void accept(List files) throws Exception {
int size = files.size();
while (size-- > 0) {
filesList.add(files.get(size));
if(size == 0) {
uploadImg2(filesList);
java.lang.OutOfMemoryError: Failed to allocate a 24 byte allocation with 0 free bytes and 3GB until OOM