android:android Studio:解析XML时出错:格式不正确(无效令牌)

android:android Studio:解析XML时出错:格式不正确(无效令牌),android,Android,由于无法在代码中找到此错误的原因,它突然在第二行提示了一个错误,这是一个意外的标记。请帮忙。提前感谢 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schema

由于无法在代码中找到此错误的原因,它突然在第二行提示了一个错误,这是一个意外的标记。请帮忙。提前感谢

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:orientation="vertical"
tools:context=".JobSeekicious">

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="65dp"
        android:layout_gravity="center"
        android:background="@color/overcast"
        android:gravity="center"
        android:text="My Profile"
        android:textSize="20dp"
        android:textStyle="bold" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="5dp"
    android:background="@drawable/logo1">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/background_color"
        android:orientation="vertical"
        android:padding="16dp">

        <Switch
            android:id="@+id/switch1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:checked="false"
            android:enabled="true"
            android:gravity="end"
            android:text="Edit" />

        <LinearLayout

            android:layout_width="match_parent"
            android:layout_height="106dp"
            android:gravity="center">

            <de.hdodenhof.circleimageview.CircleImageView xmlns:app="http://schemas.android.com/apk/res-auto"
                android:id="@+id/imageView1"
                android:layout_width="100dp"
                android:layout_height="100dp"
                android:layout_below="@+id/view"
                android:layout_centerHorizontal="true"
                android:background="@drawable/sid_required"
                app:border_width="1dp" />
        </LinearLayout>

        <LinearLayout
            android:id="@+id/datat"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/userBtns"
            android:layout_marginLeft="20dp"
            android:layout_marginRight="20dp"
            android:orientation="vertical">

            <LinearLayout

                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="First Name "
                    android:textSize="18dp" />

                <EditText
                    android:id="@+id/_my_profile_name"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:enabled="false"
                    android:gravity="left"
                    android:textSize="18dp" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="Last name "
                    android:textSize="18dp" />

                <EditText
                    android:id="@+id/_my_profile_signup_as"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:enabled="false"
                    android:gravity="left"
                    android:textSize="18dp" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="Password "
                    android:textSize="18dp" />

                <EditText
                    android:id="@+id/_my_profile_gender"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:enabled="false"
                    android:gravity="left"
                    android:textSize="18dp" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="Re-type Password "
                    android:textSize="18dp" />

                <EditText
                    android:id="@+id/_my_profile_dOb"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:enabled="false"
                    android:gravity="left" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Country "
                    android:textSize="18dp" />

                <EditText
                    android:id="@+id/_my_profile_country"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:enabled="false"
                    android:gravity="left"
                    android:textSize="18dp" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="City"
                    android:textSize="18dp" />

                <EditText
                    android:id="@+id/_my_profile_city"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:enabled="false"
                    android:gravity="left"
                    android:textSize="18dp" />
            </LinearLayout>

        </LinearLayout>


        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:gravity="center"
            android:orientation="horizontal">

            <Button
                android:id="@+id/_my_profile_save"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@color/overcast"
                android:enabled="false"
                android:text="SAVE"
                android:textColor="#fff" />

            <Button
                android:id="@+id/_my_profile_cancel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:enabled="false"
                android:text="Cancel"
                android:textColor="#000" />

        </LinearLayout>
    </LinearLayout>
   </LinearLayout>

</LinearLayout>
由于无法在代码中找到此错误的原因,它突然在第二行提示了一个错误,这是一个意外的标记


请帮忙。提前感谢

您忘记在第二行添加视图组。请添加LinearLayout并尝试运行

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:orientation="vertical"
tools:context=".JobSeekicious">

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="65dp"
        android:layout_gravity="center"
        android:background="@color/overcast"
        android:gravity="center"
        android:text="My Profile"
        android:textSize="20dp"
        android:textStyle="bold" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="5dp"
    android:background="@drawable/logo1">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/background_color"
        android:orientation="vertical"
        android:padding="16dp">

        <Switch
            android:id="@+id/switch1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:checked="false"
            android:enabled="true"
            android:gravity="end"
            android:text="Edit" />

        <LinearLayout

            android:layout_width="match_parent"
            android:layout_height="106dp"
            android:gravity="center">

            <de.hdodenhof.circleimageview.CircleImageView xmlns:app="http://schemas.android.com/apk/res-auto"
                android:id="@+id/imageView1"
                android:layout_width="100dp"
                android:layout_height="100dp"
                android:layout_below="@+id/view"
                android:layout_centerHorizontal="true"
                android:background="@drawable/sid_required"
                app:border_width="1dp" />
        </LinearLayout>

        <LinearLayout
            android:id="@+id/datat"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/userBtns"
            android:layout_marginLeft="20dp"
            android:layout_marginRight="20dp"
            android:orientation="vertical">

            <LinearLayout

                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="First Name "
                    android:textSize="18dp" />

                <EditText
                    android:id="@+id/_my_profile_name"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:enabled="false"
                    android:gravity="left"
                    android:textSize="18dp" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="Last name "
                    android:textSize="18dp" />

                <EditText
                    android:id="@+id/_my_profile_signup_as"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:enabled="false"
                    android:gravity="left"
                    android:textSize="18dp" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="Password "
                    android:textSize="18dp" />

                <EditText
                    android:id="@+id/_my_profile_gender"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:enabled="false"
                    android:gravity="left"
                    android:textSize="18dp" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="Re-type Password "
                    android:textSize="18dp" />

                <EditText
                    android:id="@+id/_my_profile_dOb"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:enabled="false"
                    android:gravity="left" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Country "
                    android:textSize="18dp" />

                <EditText
                    android:id="@+id/_my_profile_country"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:enabled="false"
                    android:gravity="left"
                    android:textSize="18dp" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="City"
                    android:textSize="18dp" />

                <EditText
                    android:id="@+id/_my_profile_city"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:enabled="false"
                    android:gravity="left"
                    android:textSize="18dp" />
            </LinearLayout>

        </LinearLayout>


        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:gravity="center"
            android:orientation="horizontal">

            <Button
                android:id="@+id/_my_profile_save"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@color/overcast"
                android:enabled="false"
                android:text="SAVE"
                android:textColor="#fff" />

            <Button
                android:id="@+id/_my_profile_cancel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:enabled="false"
                android:text="Cancel"
                android:textColor="#000" />

        </LinearLayout>
    </LinearLayout>
   </LinearLayout>

</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
            xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:tools="http://schemas.android.com/tools"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:orientation="vertical"
            tools:context=".JobSeekicious">
改为:

<?xml version="1.0" encoding="utf-8"?>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                <LinearLayout  xmlns:android="http://schemas.android.com/apk/res/android"
                xmlns:tools="http://schemas.android.com/tools"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                xmlns:app="http://schemas.android.com/apk/res-auto"
                android:orientation="vertical"
                tools:context=".JobSeekicious">

实际上,在这里粘贴代码是一个错误。我的实际代码具有视图组。虽然我删除了第一行,但它并没有解决问题 错误被删除了。我不知道它是如何为我工作的。!!!
谢谢大家。

我可以知道消息中的错误吗?不知怎的,标签和开头标签之间大约有8000个空格。请发布错误