1

When trying to add a toggle button in its most basic form:

<ToggleButton
    android:id="@+id/toggle"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/button_track"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintHorizontal_bias="0.5"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent" />

I get the following error:

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

Every question about this is marked as a duplicate of this similar error, however it seems that this is a special case where the solution lay in a deprecated use of radius in the background.

In this case, there is no background or other arguments that might cause this. What might I do to resolve this error?

Zoe
  • 27,060
  • 21
  • 118
  • 148
D. Cohen
  • 567
  • 1
  • 7
  • 22

1 Answers1

0

Just as the solution suggests in this post:

Update Android Studio to 3.3

D. Cohen
  • 567
  • 1
  • 7
  • 22
  • I believe the linked post should be recognized as a unique post and this post marked as a duplicate of that – D. Cohen Mar 16 '19 at 10:43