Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported Operation Exception for clipPath on api 15. #100

Open
2hamed opened this issue Sep 22, 2016 · 4 comments
Open

Unsupported Operation Exception for clipPath on api 15. #100

2hamed opened this issue Sep 22, 2016 · 4 comments

Comments

@2hamed
Copy link

2hamed commented Sep 22, 2016

The following exception was thrown when run inside an Api-15 Emulator device.

E/AndroidRuntime: FATAL EXCEPTION: main
                                                                      java.lang.UnsupportedOperationException
                                                                          at android.view.GLES20Canvas.clipPath(GLES20Canvas.java:413)
                                                                          at io.codetail.animation.ViewRevealManager$RevealValues.applyTransformation(ViewRevealManager.java:182)
                                                                          at io.codetail.animation.ViewRevealManager.transform(ViewRevealManager.java:88)
                                                                          at io.codetail.widget.RevealFrameLayout.drawChild(RevealFrameLayout.java:31)
                                                                          at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
                                                                          at android.view.View.getDisplayList(View.java:10415)
                                                                          at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
                                                                          at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
                                                                          at android.view.View.getDisplayList(View.java:10415)
                                                                          at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
                                                                          at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
                                                                          at android.view.View.draw(View.java:10981)
                                                                          at android.widget.FrameLayout.draw(FrameLayout.java:450)
                                                                          at android.view.View.getDisplayList(View.java:10417)
                                                                          at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
                                                                          at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
                                                                          at android.view.View.getDisplayList(View.java:10415)
                                                                          at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
                                                                          at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
                                                                          at android.view.View.getDisplayList(View.java:10415)
                                                                          at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
                                                                          at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
                                                                          at android.view.View.getDisplayList(View.java:10415)
                                                                          at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
                                                                          at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
                                                                          at android.view.View.draw(View.java:10981)
                                                                          at android.widget.FrameLayout.draw(FrameLayout.java:450)
                                                                          at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2126)
                                                                          at android.view.View.getDisplayList(View.java:10417)
                                                                          at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:842)
                                                                          at android.view.ViewRootImpl.draw(ViewRootImpl.java:1910)
                                                                          at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1634)
                                                                          at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442)
                                                                          at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                          at android.os.Looper.loop(Looper.java:137)
                                                                          at android.app.ActivityThread.main(ActivityThread.java:4424)
                                                                          at java.lang.reflect.Method.invokeNative(Native Method)
                                                                          at java.lang.reflect.Method.invoke(Method.java:511)
                                                                          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
                                                                          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
                                                                          at dalvik.system.NativeStart.main(Native Method)

I tried to accommodate the situation by setting the layer type to View.LAYER_TYPE_SOFTWARE but it was of no help.

@ozodrukh
Copy link
Owner

Hi, looks like you have enabled hardware acceleration in the manifest, in order to stop receiving this exception you need to disable it

<application android:hardwareAccelerated="true">
<!-- Or in the actviity -->
<activity android:hardwareAccelerated="false" />

@daniele-athome
Copy link

daniele-athome commented Nov 9, 2018

I believe it can be done via software call on specific cases:
https://stackoverflow.com/a/8895894/1045199

Would you be interested in a pull request addressing this? I would avoid software rendering altogether in API levels from 11 through 17.

@ozodrukh
Copy link
Owner

it would be awesome if you could give PR, I would merge it :)

@daniele-athome
Copy link

Just FYI, I've created #130.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants