AAPT错误:错误:标记不匹配.我不知道还能做什么



我一直收到一个类型不匹配的错误,我不确定我做错了什么。C: \Users\Administrator\AndroidStudioProjects\Project\app\src\main\res\layout\fragment_login.xml:50:AAPT:错误:标记不匹配

<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</com.google.android.material.textfield.TextInputEditText>

<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/senha"
app:boxBackgroundColor="#F8E9FD"
android:layout_marginTop="10dp"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp">

这是一个完整的标签,由于其末尾的/而关闭:

<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"/>

然后在第5行,您有一个已经关闭的标签的第二个关闭标签:

</com.google.android.material.textfield.TextInputEditText>

由于标记已经关闭,因此您将得到所得到的错误。

从打开标记定义的末尾删除/,或者去掉第5行。

最新更新