Android Studio Layout Error: invalid region.op - only intersect and difference are allowed

Viewed 363

I'm getting an error from Android Studio in the Preview Section of my layout, which is very simple. The error is "invalid region.op - only intersect and difference are allowed". The layout only has 2 nested linear layouts, and it stopped rendering when the 2nd linear layout was added.

Here is my layout:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorBackgroundGray"
android:orientation="vertical">

<android.support.v7.widget.RecyclerView
    android:id="@+id/recycler_view"
    android:layout_width="match_parent"
    android:layout_height="120dp"
    android:layout_below="@id/desc_textview" />

<TextView
    android:id="@+id/qty_label"
    android:layout_width="300dp"
    android:layout_height="wrap_content"
    android:layout_below="@id/recycler_view"
    android:layout_marginStart="8dp"
    android:layout_marginTop="8dp"
    android:gravity="center"
    android:text="Scan Lot Number: "
    android:textColor="@color/colorBlack"
    android:textSize="18sp" />

<EditText
    android:id="@+id/lot_num_edit"
    android:layout_width="300dp"
    android:layout_height="wrap_content"
    android:layout_below="@id/qty_label"
    android:layout_marginStart="8dp"
    android:layout_marginTop="8dp"
    android:background="@color/colorYellow"
    android:gravity="center_vertical"
    android:paddingStart="8dp"
    android:textColor="@color/colorBlack"
    android:textSize="18sp"
    tools:text="Lot Number" />

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="16dp"
    android:orientation="horizontal">

    <Button
        android:id="@+id/exit_button"
        android:layout_width="100dp"
        android:layout_height="60dp"
        android:layout_gravity="center_horizontal"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:layout_weight="1"
        android:background="@drawable/button_yellow"
        android:onClick="onExitClick"
        android:text="Exit"
        android:textColor="@color/colorBlack"
        android:textSize="20sp" />


    <Button
        android:id="@+id/ok_button"
        android:layout_width="100dp"
        android:layout_height="60dp"
        android:layout_gravity="center_horizontal"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:layout_weight="1"
        android:background="@drawable/button_gray"
        android:onClick="onOkayClick"
        android:text="OK"
        android:textColor="@color/colorBlack"
        android:textSize="20sp" />

    <Button
        android:id="@+id/cancel_button"
        android:layout_width="100dp"
        android:layout_height="60dp"
        android:layout_gravity="center_horizontal"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:layout_weight="1"
        android:background="@drawable/button_gray"
        android:onClick="onCancelClick"
        android:text="Cancel"
        android:textColor="@color/colorBlack"
        android:textSize="20sp" />

    <Button
        android:id="@+id/continue_button"
        android:layout_width="100dp"
        android:layout_height="60dp"
        android:layout_gravity="center_horizontal"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:layout_weight="1"
        android:background="@drawable/button_gray"
        android:onClick="onContinueClick"
        android:text="Continue"
        android:textColor="@color/colorBlack"
        android:textSize="20sp" />

</LinearLayout>
</LinearLayout>
0 Answers
Related