lexluthors/CompressTools-Android

压缩不成功

Opened this issue · 3 comments

CompressTools.newBuilder(this)
.setMaxHeight(1920)
.setMaxWidth(1080)
.setQuality(60)
.setFileName(System.currentTimeMillis() + "_compress")
.setDestinationDirectoryPath(SAVE_PATH)
.build()
.compressToFile(file, new CompressTools.OnCompressListener() {
@OverRide
public void onStart() {
Log.d("xx", "compressPic----" + "onStart"+ file.length());
}

                @Override
                public void onFail(String error) {
                    Log.d("xx", "compressPic----" + "onFail");

                }

                @Override
                public void onSuccess(File f) {
                    Log.d("xx", "compressPic----" + "onSuccess----" + f.length());
                    upFile = f;
                }
            });

回调只有onStart()返回了

今天遇到相同的问题。

同,安卓7.0只有onStart回调,安卓9.0什么回调都不走