Android-image-cropper: Selecting circle crop area crashes with targetsdk 28

Created on 27 Sep 2018  路  5Comments  路  Source: ArthurHub/Android-Image-Cropper

In the drawBackground method of the CropOverlayView the call:

canvas.clipPath(mPath, Region.Op.XOR);

crashes with the following message:
java.lang.IllegalArgumentException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed

Starting sdk28 the clipPath (Path path, Region.Op op) method is deprecated now as stated here:
https://developer.android.com/reference/android/graphics/Canvas#clipPath(android.graphics.Path,%20android.graphics.Region.Op)

Any change this could be changed?

Most helpful comment

This has actually been fixed in release 2.8.0 which includes pull request #618 so this issue can be closed.

All 5 comments

@ArthurHub same issue for me and it is always crash all app on android 9 (P)

Facing same issue on Android P.

Facing the same issue

Any updates?

This has actually been fixed in release 2.8.0 which includes pull request #618 so this issue can be closed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danponce picture danponce  路  3Comments

KashifAhmad picture KashifAhmad  路  11Comments

ValentinTaleb picture ValentinTaleb  路  6Comments

zemingzeng picture zemingzeng  路  5Comments

joseph-acc picture joseph-acc  路  9Comments