【发布时间】:2018-11-26 04:13:23
【问题描述】:
我正在使用最新的Material Design android 库并按照this 文档创建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。
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)
我看到了与此异常类似的其他 StackOverFlow 线程,但我没有答案,因为异常在库中。
我正在 Android P 上进行测试。
【问题讨论】:
-
你见过this吗?
标签: java android material-design