为什么在这里显示我报错啊?我这个id都没有重复过,为什么还报错哦?而且我想给checkbox写text,写在string里面,也显示我报错?



<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:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textSize="20dp"
            android:text="@string/text">
        TextView>
        <RadioGroup
            android:id="@+id/rg1"
            android:layout_width="match_parent"
            android:layout_height="match_parent">
           <RadioButton
               android:id="@+id/rt1"
               android:text="@string/btn1"
               android:layout_width="wrap_content"
               android:layout_height="wrap_content">
           RadioButton>
            <RadioButton
                android:id="@+id/rt2"
                android:text="@string/btn2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">
            RadioButton>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">
            <TextView
                android:text="请选择你的兴趣爱好:"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">
            TextView>
                <CheckBox
                    android:id="@+id/checkbox1"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="英语"/>
                <CheckBox
                    android:id="@+id/checkbox2"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="数学"/>
                <CheckBox
                    android:id="@+id/checkbox3"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="语文"/>
            LinearLayout>
    <Button
        android:id="@+id/btn1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/login" />
        RadioGroup>
    LinearLayout>

androidx.constraintlayout.widget.ConstraintLayout>

img

img

为什么在这里显示我报错啊?我这个id都没有重复过,为什么还报错哦?而且我想给checkbox写text,写在string里面,也显示我报错?

代码有问题,都不是正常的标签结尾

img