开门见山,结论就是 canvas.save(canvas.all_save_flag)该方法已经被废弃,使用 canvas.save( ) 代替
查了一圈回答没发现有解决方法,点进这个方法看了下发现
Deprecated Use save() instead.
/**
* Based on saveFlags, can save the current matrix and clip onto a private
* stack.
* <p class="note"><strong>Note:</strong> if possible, use the
* parameter-less save(). It is simpler and faster than individually
* disabling the saving of matrix or clip with this method.
* <p>
* Subsequent calls to translate,scale,rotate,skew,concat or clipRect,
* clipPath will all operate as usual, but when the balancing call to
* restore() is made, those calls will be forgotten, and the settings that
* existed before the save() will be reinstated.
*
* @removed
* @deprecated Use {@link #save()} instead.
* @param saveFlags flag bits that specify which parts of the Canvas state
* to save/restore
* @return The value to pass to restoreToCount() to balance this save()
*/
public int save(@Saveflags int saveFlags) {
return nSave(mNativeCanvasWrapper, saveFlags);
}