I'm using the latest Material Design library for android and following the this documentation to create BottomAppBar.
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".fragments.ARFragment">
<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/blue"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
Here's the exception. Full log is here.
java.lang.IllegalArgumentException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed
at android.graphics.Canvas.checkValidClipOp(Canvas.java:779)
at android.graphics.Canvas.clipRect(Canvas.java:826)
at com.google.android.material.shape.MaterialShapeDrawable.prepareCanvasForShadow(MaterialShapeDrawable.java:850)
at com.google.android.material.shape.MaterialShapeDrawable.draw(MaterialShapeDrawable.java:746)
at android.view.View.getDrawableRenderNode(View.java:20463)
at android.view.View.drawBackground(View.java:20399)
I saw the other StackOverFlow threads similar to this exception but there was no answer for me because the exception is in the library.
I'm testing on Android P.