Migrating an older Unity project to Unity 2022.3.26f1 gives Build errors (Gradle)

I am trying to migrate an a project that was originally made in Unity 2021 to Unity 2022.3.26f1. The project doesn't have any script errors but there are some compile errors. I am new to Unity so I can't understand what's causing this error specifically. Based on my research, this problem seems close to Android Development.

I am using Firebase(AdMob), Facebook and PlayFab SDKs. I have re-imported all these SDKs again in the new project and my Force Resolve works fine. Initially I was getting android.enableR8 compile error and I commented that line out but I am still getting new errors.

The errors are as follows:

ERROR 1

Configure project :
Build was configured to prefer settings repositories over project repositories but repository 'Google' was added by build file 'build.gradle'
Build was configured to prefer settings repositories over project repositories but repository 'BintrayJCenter' was added by build file 'build.gradle'
Build was configured to prefer settings repositories over project repositories but repository 'flatDir' was added by build file 'build.gradle'

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings

UnityEngine.GUIUtilityProcessEvent (int,intptr,bool&)

ERROR 2
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • Where:
    Build file 'D:\Unity Projects\ludo2\LudoHaveli\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\build.gradle' line: 7

  • What went wrong:
    A problem occurred evaluating project ':launcher'.

    No signature of method: build_2ywvsztv7ak7r9k7igei6bahp.android() is applicable for argument types: (build_2ywvsztv7ak7r9k7igei6bahp$_run_closure2) values: [build_2ywvsztv7ak7r9k7igei6bahp$_run_closure2@151a01a3]

  • Try:

    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

2: Task failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':launcher'.

    compileSdkVersion is not specified. Please add it to build.gradle

  • Try:

    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 2s

UnityEngine.GUIUtilityProcessEvent (int,intptr,bool&)

Here are my gradle files:

gradleTemplate.properties

org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
org.gradle.parallel=true
#android.enableR8=**MINIFY_WITH_R_EIGHT**
unityStreamingAssets=.unity3d**STREAMING_ASSETS**
# Android Resolver Properties Start
android.useAndroidX=true
android.enableJetifier=true
# Android Resolver Properties End
**ADDITIONAL_PROPERTIES**

settingsTemplate.gradle

pluginManagement {
    repositories {
        **ARTIFACTORYREPOSITORY**
        gradlePluginPortal()
        google()
        mavenCentral()
    }
}

include ':launcher', ':unityLibrary'
**INCLUDES**

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        **ARTIFACTORYREPOSITORY**
        google()
        mavenCentral()
// Android Resolver Repos Start
        def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")
        maven {
            url (unityProjectPath + "/Assets/GeneratedLocalRepo/Firebase/m2repository") // Assets/Firebase/Editor/AnalyticsDependencies.xml:18, Assets/Firebase/Editor/AppDependencies.xml:22, Assets/Firebase/Editor/MessagingDependencies.xml:24
        }
        maven {
            url "https://maven.google.com/" // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:7, Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:12, Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:17
        }
        maven {
            url "https://repo.maven.apache.org/maven2/" // Assets/GoogleMobileAds/Editor/MetaAudienceNetworkMediationDependencies.xml:8, Assets/GoogleMobileAds/Editor/UnityMediationDependencies.xml:9, Assets/GoogleMobileAds/Editor/UnityMediationDependencies.xml:17
        }
        maven {
            url (unityProjectPath + "/Assets/GeneratedLocalRepo/GoogleSignIn/Editor/m2repository") // Assets/GoogleSignIn/Editor/GoogleSignInSupportDependencies.xml:9
        }
        maven {
            url "https://dl.google.com/dl/android/maven2/" // Assets/GoogleMobileAds/Editor/MetaAudienceNetworkMediationDependencies.xml:8, Assets/GoogleMobileAds/Editor/UnityMediationDependencies.xml:9
        }
        mavenLocal()
// Android Resolver Repos End
        flatDir {
            dirs "${project(':unityLibrary').projectDir}/libs"
        }
    }
}

mainTemplate.gradle

apply plugin: 'com.android.library'
**APPLY_PLUGINS**

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
// Android Resolver Dependencies Start
    implementation 'androidx.lifecycle:lifecycle-common-java8:2.4.1' // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:12
    implementation 'androidx.lifecycle:lifecycle-process:2.4.1' // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:17
    implementation 'com.android.support:appcompat-v7:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
    implementation 'com.android.support:cardview-v7:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
    implementation 'com.android.support:customtabs:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
    implementation 'com.android.support:support-v4:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
    implementation 'com.facebook.android:facebook-applinks:[17.0.0,18)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:6
    implementation 'com.facebook.android:facebook-core:[17.0.0,18)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:5
    implementation 'com.facebook.android:facebook-gamingservices:[17.0.0,18)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:9
    implementation 'com.facebook.android:facebook-login:[17.0.0,18)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:7
    implementation 'com.facebook.android:facebook-share:[17.0.0,18)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:8
    implementation 'com.google.ads.mediation:facebook:6.12.0.0' // Assets/GoogleMobileAds/Editor/MetaAudienceNetworkMediationDependencies.xml:8
    implementation 'com.google.ads.mediation:unity:4.4.1.0' // Assets/GoogleMobileAds/Editor/UnityMediationDependencies.xml:9
    implementation 'com.google.android.gms:play-services-ads:21.3.0' // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:7
    implementation 'com.google.android.gms:play-services-auth:16+' // Assets/GoogleSignIn/Editor/GoogleSignInDependencies.xml:10
    implementation 'com.google.android.gms:play-services-base:18.4.0' // Assets/Firebase/Editor/AppDependencies.xml:17
    // implementation 'com.google.firebase:firebase-analytics:21.3.0' // Assets/Firebase/Editor/AnalyticsDependencies.xml:13
    implementation 'com.google.firebase:firebase-analytics:21.6.2' // Assets/Firebase/Editor/MessagingDependencies.xml:15
    implementation 'com.google.firebase:firebase-analytics-unity:11.5.0' // Assets/Firebase/Editor/AnalyticsDependencies.xml:18
    implementation 'com.google.firebase:firebase-app-unity:11.9.0' // Assets/Firebase/Editor/AppDependencies.xml:22
    implementation 'com.google.firebase:firebase-common:20.4.3' // Assets/Firebase/Editor/AppDependencies.xml:13
    implementation 'com.google.firebase:firebase-iid:21.1.0' // Assets/Firebase/Editor/MessagingDependencies.xml:17
    implementation 'com.google.firebase:firebase-messaging:23.4.1' // Assets/Firebase/Editor/MessagingDependencies.xml:13
    implementation 'com.google.firebase:firebase-messaging-unity:11.9.0' // Assets/Firebase/Editor/MessagingDependencies.xml:24
    implementation 'com.google.flatbuffers:flatbuffers-java:1.12.0' // Assets/Firebase/Editor/MessagingDependencies.xml:19
    implementation 'com.google.signin:google-signin-support:1.0.4' // Assets/GoogleSignIn/Editor/GoogleSignInSupportDependencies.xml:9
    implementation 'com.parse.bolts:bolts-android:1.4.0' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:4
    implementation 'com.unity3d.ads:unity-ads:4.4.1' // Assets/GoogleMobileAds/Editor/UnityMediationDependencies.xml:17
// Android Resolver Dependencies End
**DEPS**}

// Android Resolver Exclusions Start
android {
  packagingOptions {
      exclude ('/lib/armeabi/*' + '*')
      exclude ('/lib/mips/*' + '*')
      exclude ('/lib/mips64/*' + '*')
      exclude ('/lib/x86/*' + '*')
      exclude ('/lib/x86_64/*' + '*')
  }
}
// Android Resolver Exclusions End
android {
    ndkPath "**NDKPATH**"

    compileSdkVersion **APIVERSION**
    buildToolsVersion '**BUILDTOOLS**'

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_11
        targetCompatibility JavaVersion.VERSION_11
    }

    defaultConfig {
        minSdkVersion **MINSDKVERSION**
        targetSdkVersion **TARGETSDKVERSION**
        ndk {
            abiFilters **ABIFILTERS**
        }
        versionCode **VERSIONCODE**
        versionName '**VERSIONNAME**'
        consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
    }

    lintOptions {
        abortOnError false
    }

    aaptOptions {
        noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
        ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
    }**PACKAGING_OPTIONS**
}
**IL_CPP_BUILD_SETUP**
**SOURCE_BUILD_SETUP**
**EXTERNAL_SOURCES**

build.gradle

apply plugin: 'com.android.application'

dependencies {
    implementation project(':unityLibrary')
    }

android {
    ndkPath "D:/Unity/2022.3.26f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK"

    compileSdkVersion 33
    buildToolsVersion '32.0.0'

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_11
        targetCompatibility JavaVersion.VERSION_11
    }

    defaultConfig {
        minSdkVersion 26
        targetSdkVersion 33
        applicationId 'com.havelistudio.ludohaveli'
        ndk {
            abiFilters 'armeabi-v7a', 'arm64-v8a'
        }
        versionCode 1
        versionName '0.6'
    }

    aaptOptions {
        noCompress = ['.unity3d', '.ress', '.resource', '.obb', '.bundle', '.unityexp'] + unityStreamingAssets.tokenize(', ')
        ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
    }

    signingConfigs {
        release {
            storeFile file('D:/Unity Projects/ludo2/LudoHaveli/Assets/LudoHaveli.keystore')
            storePassword 'hidden123'
            keyAlias 'waqaskey'
            keyPassword 'hidden123'
        }
    }

    lintOptions {
        abortOnError false
    }

    buildTypes {
        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt')
            signingConfig signingConfigs.release
            jniDebuggable true
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt')
            signingConfig signingConfigs.release
        }
    }

    packagingOptions {
        doNotStrip '*/armeabi-v7a/*.so'
        doNotStrip '*/arm64-v8a/*.so'
    }

    bundle {
        language {
            enableSplit = false
        }
        density {
            enableSplit = false
        }
        abi {
            enableSplit = true
        }
    }
}

Initially I tried to import it on Unity 2022.3.16f1. I tried download gradle 7.2 and 7.3.3 externally and tried giving that path but didn't work. I reinstalled Unity but got the same error. I imported and reinstalled all the SDKs in the project.
I want to know what is causing this error and preferably, I would like to retain all the sdks in the new build.

baseProjectTemplate.gradle

// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN

allprojects {
    buildscript {
        repositories {**ARTIFACTORYREPOSITORY**
            google()
            jcenter()
        }

        dependencies {
            // If you are changing the Android Gradle Plugin version, make sure it is compatible with the Gradle version preinstalled with Unity
            // See which Gradle version is preinstalled with Unity here https://docs.unity3d.com/Manual/android-gradle-overview.html
            // See official Gradle and Android Gradle Plugin compatibility table here https://developer.android.com/studio/releases/gradle-plugin#updating-gradle
            // To specify a custom Gradle version in Unity, go do "Preferences > External Tools", uncheck "Gradle Installed with Unity (recommended)" and specify a path to a custom Gradle version
            classpath 'com.android.tools.build:gradle:3.6.0'
            classpath 'com.android.tools.lint:lint:26.3.2'
            **BUILD_SCRIPT_DEPS**
        }
    }

    repositories {**ARTIFACTORYREPOSITORY**
        google()
        jcenter()
        flatDir {
            dirs "${project(':unityLibrary').projectDir}/libs"
        }
    }
}

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

forgot to include this file in the main thread

Update, I added the line
classpath 'com.android.tools.build:gradle:7.1.2'
to by baseProjectTemplate.gradle and it proceeded but I got new errors. which are:
1.

> Configure project :
Build was configured to prefer settings repositories over project repositories but repository 'Google' was added by build file 'build.gradle'
Build was configured to prefer settings repositories over project repositories but repository 'BintrayJCenter' was added by build file 'build.gradle'
Build was configured to prefer settings repositories over project repositories but repository 'flatDir' was added by build file 'build.gradle'

> Configure project :launcher
WARNING:Using flatDir should be avoided because it doesn't support any meta-data formats.

> Configure project :unityLibrary
WARNING:Using flatDir should be avoided because it doesn't support any meta-data formats.

> Configure project :unityLibrary:FirebaseApp.androidlib
WARNING:Using flatDir should be avoided because it doesn't support any meta-data formats.

> Configure project :unityLibrary:GoogleMobileAdsPlugin.androidlib
WARNING:Using flatDir should be avoided because it doesn't support any meta-data formats.

> Configure project :unityLibrary:mobilenotifications.androidlib
WARNING:Using flatDir should be avoided because it doesn't support any meta-data formats.
WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 33

This Android Gradle plugin (7.1.2) was tested up to compileSdk = 32

This warning can be suppressed by adding
    android.suppressUnsupportedCompileSdk=33
to this project's gradle.properties

The build will continue, but you are strongly encouraged to update your project to
use a newer Android Gradle Plugin that has been tested with compileSdk = 33

> Task :launcher:preBuild UP-TO-DATE
> Task :launcher:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:FirebaseApp.androidlib:preBuild UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preBuild UP-TO-DATE
> Task :unityLibrary:preBuild UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:preBuild UP-TO-DATE
> Task :unityLibrary:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:compileReleaseAidl NO-SOURCE
> Task :unityLibrary:mergeReleaseJniLibFolders UP-TO-DATE
> Task :unityLibrary:FirebaseApp.androidlib:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:packageReleaseRenderscript NO-SOURCE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseAidl NO-SOURCE
> Task :unityLibrary:mergeReleaseNativeLibs UP-TO-DATE
> Task :unityLibrary:FirebaseApp.androidlib:compileReleaseAidl NO-SOURCE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseRenderscript NO-SOURCE
> Task :unityLibrary:mobilenotifications.androidlib:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:FirebaseApp.androidlib:packageReleaseRenderscript NO-SOURCE
> Task :launcher:generateReleaseBuildConfig UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:mobilenotifications.androidlib:generateReleaseResValues UP-TO-DATE
> Task :unityLibrary:FirebaseApp.androidlib:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:mobilenotifications.androidlib:generateReleaseResources UP-TO-DATE
> Task :launcher:javaPreCompileRelease UP-TO-DATE
> Task :unityLibrary:FirebaseApp.androidlib:generateReleaseResValues UP-TO-DATE
> Task :unityLibrary:FirebaseApp.androidlib:generateReleaseResources UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResValues UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResources UP-TO-DATE
> Task :launcher:generateReleaseResValues UP-TO-DATE
> Task :launcher:createReleaseCompatibleScreenManifests UP-TO-DATE
> Task :launcher:extractDeepLinksRelease UP-TO-DATE
> Task :launcher:extractProguardFiles UP-TO-DATE
> Task :launcher:mergeReleaseJniLibFolders UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:packageReleaseResources UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseResources UP-TO-DATE
> Task :unityLibrary:FirebaseApp.androidlib:packageReleaseResources UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:parseReleaseLocalResources UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:processReleaseManifest UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:generateReleaseRFile UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:generateReleaseBuildConfig UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:javaPreCompileRelease UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:compileReleaseJavaWithJavac UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:bundleLibCompileToJarRelease UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:mergeReleaseJniLibFolders UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:mergeReleaseNativeLibs NO-SOURCE
> Task :unityLibrary:mobilenotifications.androidlib:stripReleaseDebugSymbols NO-SOURCE
> Task :unityLibrary:mobilenotifications.androidlib:copyReleaseJniLibsProjectAndLocalJars UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:extractReleaseAnnotations UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:mergeReleaseGeneratedProguardFiles UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:mergeReleaseConsumerProguardFiles UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:mergeReleaseShaders UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:compileReleaseShaders NO-SOURCE
> Task :unityLibrary:mobilenotifications.androidlib:generateReleaseAssets UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:packageReleaseAssets UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:prepareLintJarForPublish UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:prepareReleaseArtProfile UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:extractProguardFiles UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:generateReleaseLibraryProguardRules UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:processReleaseJavaRes NO-SOURCE
> Task :unityLibrary:mobilenotifications.androidlib:mergeReleaseJavaResource UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:minifyReleaseWithR8 UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:syncReleaseLibJars UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:writeReleaseAarMetadata UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:bundleReleaseLocalLintAar UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:extractDeepLinksRelease UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:compileReleaseLibraryResources UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:bundleLibResRelease NO-SOURCE
> Task :unityLibrary:mobilenotifications.androidlib:bundleLibRuntimeToJarRelease UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:createFullJarRelease UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:writeReleaseLintModelMetadata UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:copyReleaseJniLibsProjectOnly UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:bundleLibRuntimeToDirRelease UP-TO-DATE
> Task :unityLibrary:stripReleaseDebugSymbols
> Task :unityLibrary:compileReleaseAidl NO-SOURCE
> Task :unityLibrary:copyReleaseJniLibsProjectAndLocalJars UP-TO-DATE
> Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:generateReleaseBuildConfig UP-TO-DATE
> Task :unityLibrary:generateReleaseResValues UP-TO-DATE
> Task :unityLibrary:generateReleaseResources UP-TO-DATE
> Task :unityLibrary:packageReleaseResources UP-TO-DATE
> Task :launcher:compileReleaseAidl NO-SOURCE
> Task :launcher:mergeReleaseShaders
> Task :launcher:compileReleaseShaders NO-SOURCE
> Task :launcher:generateReleaseAssets UP-TO-DATE
> Task :launcher:processReleaseJavaRes NO-SOURCE
> Task :launcher:checkReleaseDuplicateClasses FAILED
> Task :unityLibrary:parseReleaseLocalResources
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:parseReleaseLocalResources
> Task :unityLibrary:FirebaseApp.androidlib:parseReleaseLocalResources
> Task :launcher:desugarReleaseFileDependencies
> Task :launcher:collectReleaseDependencies

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings
57 actionable tasks: 8 executed, 49 up-to-date

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

2.

Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
   > Duplicate class com.facebook.android.BuildConfig found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.BaseActivity found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.Constants found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FB found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FB$1 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FB$10 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FB$11 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FB$12 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FB$13 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FB$2 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FB$3 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FB$4 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FB$5 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FB$6 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FB$7 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FB$8 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FB$9 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBDialogUtils found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBLogin found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBLogin$1 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBUnityAppLinkActivity found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBUnityAppLinkBaseActivity found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBUnityChooseGamingContextActivity found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBUnityChooseGamingContextActivity$1 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBUnityCreateGamingContextActivity found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBUnityCreateGamingContextActivity$1 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBUnityDeepLinkingActivity found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBUnityDialogsActivity found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBUnityDialogsActivity$1 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBUnityGameRequestActivity found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBUnityGameRequestActivity$1 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBUnityGamingServicesFriendFinderActivity found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBUnityGamingServicesFriendFinderActivity$1 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBUnityLoginActivity found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBUnityLoginActivity$1 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBUnityLoginActivity$LoginType found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBUnitySwitchGamingContextActivity found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.FBUnitySwitchGamingContextActivity$1 found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.UnityCallable found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.UnityMessage found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.UnityParams found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)
     Duplicate class com.facebook.unity.UnityReflection found in modules jetified-facebook-android-wrapper-14.1.0-runtime (:facebook-android-wrapper-14.1.0:) and jetified-facebook-android-wrapper-17.0.0-runtime (:facebook-android-wrapper-17.0.0:)

     Go to the documentation to learn how to Fix dependency resolution errors.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 17s

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Looks like you have 2 different versions of Facebook plugin added. Try cleaning that up and running Dependency resolution once again