Canvas: trying to use a recycled bitmap android.graphics.Bitmap in Android

后端 未结 8 1711
忘掉有多难
忘掉有多难 2020-12-13 17:32

I am working on the crop image class, but encounter a recycled bit map problem:

03-02 23:14:10.514: E/AndroidRuntime(16736): FATAL EXCEPTION: Thread-1470
03-         


        
8条回答
  •  Happy的楠姐
    2020-12-13 17:54

    Probably the image/png files which you are using have bigger dimensions then 512pixels e.g width or height is greater than 512pixels. Try to decrease the dimensions to at least 512 pixels. In my case I was also getting same error like E/BitmapDrawable: Canvas: trying to use a recycled bitmap.

    By using above described way, I was able to solve the error in a day.

    Keynote 512 pixels maybe not exact value for threshold, so take a look at your logcat too.

提交回复
热议问题