[How to Solve] canvas.save(Canvas.ALL_SAVE_FLAG) canvas.save(Canvas.ALL_SAVE_FLAG); will report error in androidP Modify: canvas.save(Canvas.ALL_SAVE_FLAG); –> canvas.save();