Search code examples
androidxmlkotlinandroid-layoutandroid-activity

Problem with an element in xml and kotlin [Gave a ID twice]


Pastebin | Full xml file

xml element

    <EditText
    android:id="@+id/etBaseAmount"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginStart="32dp"
    android:ems="8"
    android:hint="Bill amount"
    android:inputType="numberDecimal"
    android:textSize="24sp"
    app:layout_constraintBottom_toBottomOf="@+id/tvBaseLabel"
    app:layout_constraintStart_toEndOf="@+id/tvBaseLabel"
    app:layout_constraintTop_toTopOf="@+id/tvBaseLabel" />

Log

Can someone say me what I did wrong?

I work with Android 11


Solution

  • I actually found the solution randomly: The problem was that for an unknow reason the element was twice in the file xD