美文网首页
java.lang.IllegalStateException:

java.lang.IllegalStateException:

作者: BBNO | 来源:发表于2019-12-19 15:25 被阅读0次

问题:
java.lang.IllegalStateException: Can't compress a recycled bitmap

解决:

View drawingView = get_your_view_for_render;
drawingView.buildDrawingCache(true);
Bitmap bitmap = drawingView.getDrawingCache(true).copy(Config.RGB_565, false);
drawingView.destroyDrawingCache();
// bitmap is now OK for you to use without recycling errors.

相关文章

网友评论

      本文标题:java.lang.IllegalStateException:

      本文链接:https://www.haomeiwen.com/subject/togmnctx.html