I recently switched my targeted platform api from 26 to 28 and now I can't compile my project.
I get this error:
error: cannot find symbol variable CLIP_SAVE_FLAG
when I use canvas.save() in my onDraw() method:
canvas.save(Canvas.CLIP_SAVE_FLAG | Canvas.MATRIX_SAVE_FLAG);
^complains about setting the properties above.
I have nearly the same issue logged here: https://github.com/umano/AndroidSlidingUpPanel/issues/921
How can I resolve this issue so that I can target the latest android apis.
Thanks!
EDIT: I checked the duplicate link here:
Can not find Canvas variables in API Level 28
but when using the canvas.saveLayer(), it's not support for APIs under 21.
I get this error:
Call requires API level 21 (current min is 19): android.graphics.Canvas#saveLayer
What should I do if I need support for API 19 and above?