Shouheng88/Compressor

Android 10 支持吗

jp1017 opened this issue · 4 comments

Android 10 支持吗
AitGo commented

同问,android10

在 Android 10 设备上面测试,工作正常

it is not working in redmi android 10. I am getting "Can't compress a recycled bitmap"

val compressor = Compress.with(context, profilePhotoFile/*this is file object*/)
                .setQuality(80)
                // Specify strategy
                .strategy(Strategies.compressor())
                .setCompressListener(object : CompressListener {
                    override fun onError(throwable: Throwable) {
                        throwable.printStackTrace()
                        loading.value = false
                        validationError.value = throwable.message
                    }   

                    override fun onStart() {
                    }

                    override fun onSuccess(result: File) {
                        callAPi(result)
                    }
                })
            compressor.launch()

can you please know me what's an issue?

Seems the bitmap is recycled. Can you provide the detail error stack by the throwable on onError method?