whilu / AndroidTagView

A TagView library for Android. Customize your own & Drag effect.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

java.lang.IllegalArgumentException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed

LarchLiu opened this issue · comments

As of API Level Build.VERSION_CODES.P only Region.Op.INTERSECT and Region.Op.DIFFERENCE are valid Region.Op parameters.

gradle 1.1.4
java.lang.IllegalArgumentException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed   at android.graphics.Canvas.checkValidClipOp(Canvas.java:779)   at android.graphics.Canvas.clipPath(Canvas.java:1007)   at co.lujun.androidtagview.TagView.drawRipple(TagView.java:375)   at co.lujun.androidtagview.TagView.onDraw_Original(TagView.java:214)   at co.lujun.androidtagview.TagView.onDraw(TagView.java:-1)   at android.view.View.draw_Original(View.java:20207)   at android.view.View_Delegate.draw(View_Delegate.java:56)   at android.view.View.draw(View.java:20177)

I have same error on Android P.

commented

Same error, Android 9.0 API 28 in emulator.

对于这个问题把原主的,改成了lib的本地依赖,并且自己判断了,也希望早点兼容一下
28

According to Google's documentation this is the bug.

commented

Same Here version is 1.1.5 cant update 1.1.6 asking increase minSDK to 21

java.lang.IllegalArgumentException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed
at android.graphics.Canvas.checkValidClipOp(Canvas.java:779)
at android.graphics.Canvas.clipPath(Canvas.java:1007)
at co.lujun.androidtagview.TagView.drawRipple(TagView.java:402)
at co.lujun.androidtagview.TagView.onDraw(TagView.java:226)
at android.view.View.draw(View.java:20207)
at android.view.View.updateDisplayListIfDirty(View.java:19082)
at android.view.View.draw(View.java:19935)
at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
at android.view.View.draw(View.java:20210)
at android.view.View.updateDisplayListIfDirty(View.java:19082)
at android.view.View.draw(View.java:19935)
at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
at android.view.View.updateDisplayListIfDirty(View.java:19073)
at android.view.View.draw(View.java:19935)
at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)

commented

+1

commented

i have migrate my project to AndroidX its working fine.

I have exactly same problem here.
Migrating to AndroidX didn't work.

Hi,
Just discovered that this issue has been fixed in version 1.1.7, owner should mark the issue as closed.

@sufyan-info I can't get the ripple to show for >= Oreo. This seems related.