Canvas: trying to use a recycled bitmap android.graphics....

实现播放幻灯片的效果时,出现如下问题:

Canvas: trying to use a recycled bitmap android.graphics.Bitmap@1c88f6a

在这里插入图片描述

if (bd != null && !bd.getBitmap().isRecycled()) {
    
    
                bd.getBitmap().recycle();
            }

改成

if (bd != null && !bd.getBitmap().isRecycled()) {
    
    
                bd = null;
            }

问题解决,已验证!!!

猜你喜欢

转载自blog.csdn.net/weixin_44495678/article/details/117325504