Error:(6) error: XML or text declaration not at start of entity

Error:(6) error: XML or text declaration not at start of entity

我的 android 项目在我尝试构建时出现此错误 it.I 找到了几个告诉我最初删除空格的解决方案。但不幸的是,我没有任何空格。那么您能告诉我为什么会出现错误以及可能的解决方案吗?

我的 XML 在这里 :

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:showIn="navigation_view">

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">

    <group android:checkableBehavior="single">
        <item
            android:id="@+id/nav_allplace"
            android:icon="@drawable/ic_all_places"
            android:title="@string/nav_title_all_place" />

        <item
            android:id="@+id/nav_categories"
            android:icon="@drawable/ic_categories"
            android:title="@string/nav_title_categories" />

        <item
            android:id="@+id/nav_map"
            android:icon="@drawable/ic_map"
            android:title="@string/nav_title_map" />

        <item
            android:id="@+id/nav_ar"
            android:icon="@drawable/ic_ar_camera"
            android:title="@string/nav_ar_map" />

    </group>

    <group android:checkableBehavior="none">
        <item android:title="@string/nav_title_my_activities">
            <menu>
                <group android:checkableBehavior="single">
                    <item
                        android:id="@+id/nav_review"
                        android:icon="@drawable/ic_rate_review"
                        android:title="@string/nav_title_rates_and_reviews" />
                    <item
                        android:id="@+id/nav_gallery"
                        android:icon="@drawable/ic_collections"
                        android:title="@string/nav_title_gallery" />
                    <item
                        android:id="@+id/nav_logout"
                        android:icon="@drawable/ic_cancel"
                        android:title="@string/nav_title_sign_out" />
                </group>
            </menu>
        </item>
    </group>

    <group android:checkableBehavior="none">
        <item android:title="@string/setting_test">
            <menu>
                <group android:checkableBehavior="single">
                    <item
                        android:id="@+id/nav_about"
                        android:icon="@drawable/ic_about"
                        android:title="@string/str_about" />
                </group>
            </menu>
        </item>
    </group>


</menu>

删除多余的

<?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android">