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

问题:
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: Can't compress a recycled bitmap)