Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OOM了 #61

Open
JsonWong87 opened this issue Nov 6, 2018 · 0 comments
Open

OOM了 #61

JsonWong87 opened this issue Nov 6, 2018 · 0 comments

Comments

@JsonWong87
Copy link

不断的循环压缩就出现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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant