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

后端 未结 8 1713
忘掉有多难
忘掉有多难 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条回答
  • 2020-12-13 18:01

    Android doesn't allows us reuse recycled Bitmap .just comment the bitmap.recycle() to resolve this error. For more details click here

    0 讨论(0)
  • 2020-12-13 18:03

    In my case error was caused because I changed visibility from gone to visible (or vice versa) of an element of the layout. And as consequence the space for the imageview and the bitmap created changed, so recycling caused app to crash. Avoid this and your problem will be fix.

    0 讨论(0)
提交回复
热议问题