1. Are you ready for the Galaxy S20? Here is everything we know so far!

I have error message in Build Output

Discussion in 'Android Development' started by Mohamed13, Jan 21, 2021.

  1. Mohamed13

    Mohamed13 Lurker
    Thread Starter

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

    Code (Java):
    1. <?xml version="1.0" encoding="utf-8"?>
    2.  
    3. <androidx.constraintlayout.widget.ConstraintLayout
    4.  
    5. xmlns:android="http://schemas.android.com/apk/res/android
    6. "
    7.  
    8. xmlns:app="http://schemas.android.com/apk/res-auto
    9. "
    10.  
    11. xmlns:tools="http://schemas.android.com/tools
    12. "
    13.  
    14. android:id="@+id/circularRevealFrameLayout"
    15.  
    16. android:layout_width="match_parent"
    17.  
    18. android:layout_height="match_parent">
    19.  
    20. <ImageView
    21.  
    22. android:id="@+id/imageView"
    23.  
    24. android:layout_width="411dp"
    25.  
    26. android:layout_height="672dp"
    27.  
    28. android:background="@drawable/blue_background"
    29.  
    30. android:contentDescription="@string/todo"
    31.  
    32. app:layout_constraintEnd_toEndOf="matchmaker"
    33.  
    34. app:layout_constraintTop_toTopOf="matchmaker" />
    35.  
    36. <TextView
    37.  
    38. android:id="@+id/textView"
    39.  
    40. android:layout_width="wrap_content"
    41.  
    42. android:layout_height="wrap_content"
    43.  
    44. android:layout_marginStart="16dp"
    45.  
    46. android:layout_marginTop="16dp"
    47.  
    48. android:gravity="center_horizontal"
    49.  
    50. android:text="which colour is in the background"
    51.  
    52. android:textAlignment="center"
    53.  
    54. android:textSize="15pt"
    55.  
    56. app:layout_constraintStart_toStartOf="parent"
    57.  
    58. app:layout_constraintTop_toTopOf="parent"
    59.  
    60. tools:ignore="HardcodedText,MissingConstraints" />
    61.  
    62.  
    63. android:id="@+id/choice1"
    64.  
    65. android:layout_width="wrap_content"
    66.  
    67. android:layout_height="wrap_content"
    68.  
    69. android:layout_marginBottom="132dp"
    70.  
    71. android:background="#0091EA"
    72.  
    73. android:padding="2dp"
    74.  
    75. android:text="Blue"
    76.  
    77. android:textColor="#FFF"
    78.  
    79. android:textSize="40sp"
    80.  
    81. app:layout_constraintBottom_toBottomOf="parent"
    82.  
    83. app:layout_constraintEnd_toEndOf="parent"
    84.  
    85. app:layout_constraintHorizontal_bias="0.0"
    86.  
    87. app:layout_constraintStart_toStartOf="parent"
    88.  
    89. app:layout_constraintTop_toBottomOf="@+id/imageView"
    90.  
    91. app:layout_constraintVertical_bias="0.838"
    92.  
    93. tools:ignore="HardcodedText"/>
    94.  
    95.  
    96. android:id="@+id/choice2"
    97.  
    98. android:layout_width="wrap_content"
    99.  
    100. android:layout_height="wrap_content"
    101.  
    102. android:layout_marginBottom="124dp"
    103.  
    104. android:background="#0091EA"
    105.  
    106. android:padding="1dp"
    107.  
    108. android:text="Red"
    109.  
    110. android:textColor="#FFF"
    111.  
    112. android:textSize="45sp"
    113.  
    114. app:layout_constraintBottom_toBottomOf="matchmaker"
    115.  
    116. app:layout_constraintEnd_toEndOf="matchmaker"
    117.  
    118. app:layout_constraintHorizontal_bias="1.0"
    119.  
    120. app:layout_constraintStart_toStartOf="parent"
    121.  
    122. tools:ignore="HardcodedText" />
    123.  
    124.  
    125. android:id="@+id/choice3"
    126.  
    127. android:layout_width="112dp"
    128.  
    129. android:layout_height="0dp"
    130.  
    131. android:layout_marginEnd="16dp"
    132.  
    133. android:background="#0091EA"
    134.  
    135. android:padding="1dp"
    136.  
    137. android:text="@string/green"
    138.  
    139. android:textColor="#FFF"
    140.  
    141. android:textSize="45sp"
    142.  
    143. app:layout_constraintEnd_toEndOf="matchmaker"
    144.  
    145. app:layout_constraintTop_toBottomOf="matchmaker"
    146.  
    147. tools:ignore="MissingConstraints" />
    148.  
    149. </androidx.constraintlayout.widget.ConstraintLayout>
     



    1. Download the Forums for Android™ app!


      Download

       
  2. Unforgiven

    Unforgiven ...eschew obfuscation...
    Moderator

    Development thread moved to the dev area for better exposure. Good luck!! :)
     
    ocnbrze likes this.
Loading...
Similar Threads - error message Build
  1. Jehantqs
    Replies:
    0
    Views:
    20
  2. Mohamed13
    Replies:
    0
    Views:
    332
  3. Nolag
    Replies:
    1
    Views:
    815
  4. pratappulugurta
    Replies:
    7
    Views:
    1,019
  5. AshS23
    Replies:
    0
    Views:
    216
  6. Solomonboy
    Replies:
    3
    Views:
    586
  7. Stewart1962
    Replies:
    2
    Views:
    315
  8. Marilyn Reeder
    Replies:
    2
    Views:
    915
  9. James_Watson
    Replies:
    1
    Views:
    1,188
  10. JackOats
    Replies:
    2
    Views:
    6,807

Share This Page

Loading...