ref:
練習用心智圖 講解埋log debug
ref:
https://stackoverflow.com/a/41391185
- Downgrade
targetSdkVersion
to 22 you can run it: meaning it does not crash! but I really don'trecommend that.
- Call
canvas.save();
before every restore()
is another suggestion from your link given that you can try