序言中不能有内容。构建我的 android 项目时出现此错误

Content is not allowed in prolog. Getting this error while building my android project

我在过去 24 小时内收到此错误。请帮我解决这个问题。更新依赖版本后出现此错误。我还添加了 Exo 播放器依赖项。我不知道真正的问题是什么。

我尝试了以下操作:

** 清理并重建项目**

** 删除C:/users/中的缓存文件。android/cache**

** 重新启动 android 工作室**

** 检查 xml 个文件的编码方案**

这是我的构建 gradle(app) 文件:

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 29
    defaultConfig {
        applicationId "com.example.eventscheduling"
        minSdkVersion 22
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.navigation:navigation-fragment:2.3.0'
    implementation "androidx.constraintlayout:constraintlayout:2.0.1"

    implementation 'androidx.navigation:navigation-ui:2.3.0'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'

    implementation 'com.google.firebase:firebase-functions:19.1.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    implementation "com.google.android.gms:play-services-location:17.0.0"
// Firebase dependencies
    implementation 'com.google.firebase:firebase-storage:19.2.0'
    implementation 'com.google.firebase:firebase-auth:19.3.2'
    implementation 'com.google.firebase:firebase-firestore:21.6.0'
    implementation 'com.firebaseui:firebase-ui-firestore:6.2.1'
    // glide libraries
    implementation 'com.github.bumptech.glide:glide:4.11.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'

    // CircleView images
    implementation 'de.hdodenhof:circleimageview:3.1.0'
    // Material dependency
    implementation 'com.google.android.material:material:1.2.1'

    //Stylable Toast
    implementation 'com.muddzdev:styleabletoast:2.2.3'

    // GraphView dependency
    implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'

    // Volley library
    implementation 'com.android.volley:volley:1.1.1'
}

我一次又一次地收到这个错误。 Build gradle(app)

这是构建 gradle(模块)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        google()
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.0.1'
        classpath 'com.google.gms:google-services:4.3.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }


    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

这是清单文件

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.eventscheduling">
    <!--
         The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
         Google Maps Android API v2, but you must specify either coarse or fine
         location permissions for the 'MyLocation' functionality.
    -->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".eventorg.ui.evntOrg_setting" />
        <activity android:name=".eventorg.ui.evntOrg_Package_detail" />
        <activity android:name=".eventorg.ui.evntOrg_Package_create" />
        <activity android:name=".eventorg.ui.evntOrg_emailVerification" />
        <activity android:name=".eventorg.ui.evntOrg_friend_list" />
        <activity android:name=".eventorg.ui.evntOrg_MessageDetail" />
        <activity android:name=".eventorg.mapService" />
        <activity android:name=".util.InternetBroadCastReceiver" />
        <activity
            android:name=".client.ui.client_home"
            android:theme="@style/AppTheme.NoActionBar" />
        <activity
            android:name=".eventorg.ui.evntOrg_home"
            android:label="@string/title_activity_evnt_org_home"
            android:theme="@style/AppTheme.NoActionBar" />
        <!--
             The API key for Google Maps-based APIs is defined as a string resource.
             (See the file "res/values/google_maps_api.xml").
             Note that the API key is linked to the encryption key used to sign the APK.
             You need a different API key for each encryption key, including the release key that is used to
             sign the APK for publishing.
             You can define the keys for the debug and release targets in src/debug/ and src/release/.
        -->
        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="@string/google_maps_key" />

        <activity
            android:name=".MapLocation"
            android:label="Map" />
        <activity
            android:name=".eventorg.ui.evntOrg_signUp2"
            android:label="Sign Up" />
        <activity
            android:name=".SplashActivity"
            android:theme="@style/splashScreenStyle">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".MainActivity"
            android:label="EventSchedulingSystem" />
        <activity
            android:name=".eventorg.ui.evntOrg_signIn"
            android:label="Sign In"
            android:theme="@style/splashScreenStyle" />
        <activity
            android:name=".eventorg.ui.evntOrg_signUp"
            android:label="Sign Up" />
        <activity android:name=".client.ui.client_signIn" />
        <activity android:name=".client.ui.client_signUp" />

        <service android:name=".eventorg.mapService" />
    </application>

</manifest>

任何帮助都会appreciated.Thanks

我收到这个错误是因为我的 firebase 依赖项的版本号不一样。我通过更改版本号来修复此错误。