• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

I have error message in Build Output

Mohamed13

Lurker
The error message saying "AAPT: error: 'matchmaker' is incompatible with attribute layout_constraintTop_toTopOf (attr) reference|enum [parent=0]. How to fix it?

Java:
<?xml version="1.0" encoding="utf-8"?>

<androidx.constraintlayout.widget.ConstraintLayout

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:id="@+id/circularRevealFrameLayout"

android:layout_width="match_parent"

android:layout_height="match_parent">

<ImageView

android:id="@+id/imageView"

android:layout_width="411dp"

android:layout_height="672dp"

android:background="@drawable/blue_background"

android:contentDescription="@string/todo"

app:layout_constraintEnd_toEndOf="matchmaker"

app:layout_constraintTop_toTopOf="matchmaker" />

<TextView

android:id="@+id/textView"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginStart="16dp"

android:layout_marginTop="16dp"

android:gravity="center_horizontal"

android:text="which colour is in the background"

android:textAlignment="center"

android:textSize="15pt"

app:layout_constraintStart_toStartOf="parent"

app:layout_constraintTop_toTopOf="parent"

tools:ignore="HardcodedText,MissingConstraints" />

<Button

android:id="@+id/choice1"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginBottom="132dp"

android:background="#0091EA"

android:padding="2dp"

android:text="Blue"

android:textColor="#FFF"

android:textSize="40sp"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintEnd_toEndOf="parent"

app:layout_constraintHorizontal_bias="0.0"

app:layout_constraintStart_toStartOf="parent"

app:layout_constraintTop_toBottomOf="@+id/imageView"

app:layout_constraintVertical_bias="0.838"

tools:ignore="HardcodedText"/>

<Button

android:id="@+id/choice2"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginBottom="124dp"

android:background="#0091EA"

android:padding="1dp"

android:text="Red"

android:textColor="#FFF"

android:textSize="45sp"

app:layout_constraintBottom_toBottomOf="matchmaker"

app:layout_constraintEnd_toEndOf="matchmaker"

app:layout_constraintHorizontal_bias="1.0"

app:layout_constraintStart_toStartOf="parent"

tools:ignore="HardcodedText" />

<Button

android:id="@+id/choice3"

android:layout_width="112dp"

android:layout_height="0dp"

android:layout_marginEnd="16dp"

android:background="#0091EA"

android:padding="1dp"

android:text="@string/green"

android:textColor="#FFF"

android:textSize="45sp"

app:layout_constraintEnd_toEndOf="matchmaker"

app:layout_constraintTop_toBottomOf="matchmaker"

tools:ignore="MissingConstraints" />

</androidx.constraintlayout.widget.ConstraintLayout>
 
Back
Top Bottom