Many errors when trying to build for android

When I try to build I get this plethora of errors that I cannot overcome.


> Configure project :launcher
WARNING:The option setting 'android.aapt2FromMavenOverride=C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\34.0.0\aapt2.exe' is experimental.
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:GoogleMobileAdsPlugin.androidlib
WARNING:Using flatDir should be avoided because it doesn't support any meta-data formats.
WARNING:minSdkVersion (22) is greater than targetSdkVersion (16) for variant "debug". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.
WARNING:minSdkVersion (22) is greater than targetSdkVersion (16) for variant "release". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.

> Configure project :unityLibrary:GooglePlayGamesManifest.androidlib
WARNING:Using flatDir should be avoided because it doesn't support any meta-data formats.
WARNING:minSdkVersion (22) is greater than targetSdkVersion (16) for variant "debug". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.
WARNING:minSdkVersion (22) is greater than targetSdkVersion (16) for variant "release". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.

> Configure project :unityLibrary:GooglePlayGamesManifest.plugin
WARNING:Using flatDir should be avoided because it doesn't support any meta-data formats.
WARNING:minSdkVersion (22) is greater than targetSdkVersion (16) for variant "debug". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.
WARNING:minSdkVersion (22) is greater than targetSdkVersion (16) for variant "release". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\34.0.0\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-33\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-34\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-35\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\34.0.0\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-33\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-34\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-35\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only

> Task :unityLibrary:preBuild UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preBuild UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:preBuild UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:preBuild UP-TO-DATE
> Task :unityLibrary:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseRenderscript NO-SOURCE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:packageReleaseRenderscript NO-SOURCE
> Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:packageReleaseRenderscript NO-SOURCE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:generateReleaseResValues UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResValues UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResources UP-TO-DATE
> Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:generateReleaseResValues UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:generateReleaseResValues UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:generateReleaseResources UP-TO-DATE
> Task :unityLibrary:generateReleaseResources UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:generateReleaseResources UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:packageReleaseResources UP-TO-DATE
> Task :unityLibrary:packageReleaseResources UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseResources UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:packageReleaseResources UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:extractDeepLinksRelease UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:extractDeepLinksRelease UP-TO-DATE
> Task :unityLibrary:extractDeepLinksRelease UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:extractDeepLinksRelease UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:processReleaseManifest UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseManifest UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:processReleaseManifest UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:compileReleaseLibraryResources UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:compileReleaseLibraryResources UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseLibraryResources UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:compileReleaseAidl NO-SOURCE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:compileReleaseAidl NO-SOURCE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseAidl NO-SOURCE
> Task :unityLibrary:compileReleaseLibraryResources UP-TO-DATE
> Task :unityLibrary:compileReleaseAidl NO-SOURCE
> Task :unityLibrary:generateReleaseBuildConfig UP-TO-DATE
> Task :unityLibrary:processReleaseManifest
> Task :launcher:preBuild UP-TO-DATE
> Task :launcher:preReleaseBuild UP-TO-DATE
> Task :launcher:compileReleaseRenderscript NO-SOURCE
> Task :launcher:generateReleaseResValues UP-TO-DATE
> Task :launcher:mapReleaseSourceSetPaths FAILED
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:parseReleaseLocalResources
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:parseReleaseLocalResources
> Task :unityLibrary:GooglePlayGamesManifest.plugin:parseReleaseLocalResources
> Task :unityLibrary:parseReleaseLocalResources
27 actionable tasks: 6 executed, 21 up-to-date

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


FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':launcher:mapReleaseSourceSetPaths'.
> Could not resolve all files for configuration ':launcher:releaseRuntimeClasspath'.
   > Could not find com.google.games:gpgs-plugin-support:0.10.14.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/google/games/gpgs-plugin-support/0.10.14/gpgs-plugin-support-0.10.14.pom
       - https://repo.maven.apache.org/maven2/com/google/games/gpgs-plugin-support/0.10.14/gpgs-plugin-support-0.10.14.pom
       - file:/C:/The workshop II/Donut Roller 2020/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/gpgs-plugin-support-0.10.14.jar
       - file:/C:/The workshop II/Donut Roller 2020/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/gpgs-plugin-support.jar
     Required by:
         project :launcher > project :unityLibrary

* 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:
java.lang.StackOverflowError (no error message)

* 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 5s

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

CommandInvokationFailure: Gradle build failed. 
C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-7.5.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "bundleRelease"

Environment Variables:
PROCESSOR_ARCHITECTURE = AMD64
AMPLITUDE_API_KEY_YELLOWBUCKET_DEV = 48835b4d1f5e342aefe5f016324d296a
DokanLibrary1 = C:\Program Files\Dokan\Dokan Library-1.4.1\
ANDROID_NDK_ROOT = C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK
DriverData = C:\Windows\System32\Drivers\DriverData
USERDOMAIN = DSKP-TEOII
CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
COMPUTERNAME = DSKP-TEOII
DEBUG_ENV_VAR = UnityHub
LOGONSERVER = \\DSKP-TEOII
AMPLITUDE_TOKEN_GREENBUCKET_PROD = ZpUcbAdZXJYzNSoHsAWtL_s_JppwWid9
PUBLIC = C:\Users\Public
ProgramData = C:\ProgramData
SESSIONNAME = Console
AMPLITUDE_TOKEN_YELLOWBUCKET_PROD = UYDQtPOw83dIfVy3SrW5oMyo7ru4PRkV
ALLUSERSPROFILE = C:\ProgramData
SystemRoot = C:\Windows
windir = C:\Windows
AMPLITUDE_API_KEY_REDBUCKET_DEV = 46b8b46515e7632fc42a504b72e05fd0
ProgramFiles(x86) = C:\Program Files (x86)
ProgramW6432 = C:\Program Files
OS = Windows_NT
PROCESSOR_IDENTIFIER = AMD64 Family 23 Model 8 Stepping 2, AuthenticAMD
HOMEPATH = \Users\sbern
FPS_BROWSER_USER_PROFILE_STRING = Default
AMPLITUDE_TOKEN_REDBUCKET_DEV = U4PSN7S7PuYVRODivvdcFwbu8R6IHGqa
CHROME_CRASHPAD_PIPE_NAME = \\.\pipe\crashpad_11836_FRKQEQVQOSNVJACR
PROCESSOR_LEVEL = 23
CommonProgramFiles = C:\Program Files\Common Files
DokanLibrary1_LibraryPath_x64 = C:\Program Files\Dokan\Dokan Library-1.4.1\lib\
JAVA_HOME = C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK
USERDOMAIN_ROAMINGPROFILE = DSKP-TEOII
TEMP = C:\Users\sbern\AppData\Local\Temp
ProgramFiles = C:\Program Files
CommonProgramW6432 = C:\Program Files\Common Files
AMPLITUDE_TOKEN_YELLOWBUCKET_DEV = wKi8foVigDditGFvmZewRFWsEbX9Y0YO
AMPLITUDE_API_KEY_GREENBUCKET_DEV = 3ded2a762163603391a425f688f990c8
AMPLITUDE_API_KEY_REDBUCKET_PROD = ca12bb461ea96f9bdf5df4ded7d52994
HOMEDRIVE = C:
AMPLITUDE_API_KEY_STAGING = 83ee04fccc67e4fcc7dd527c4c6f1e21
DokanLibrary1_LibraryPath_x86 = C:\Program Files\Dokan\Dokan Library-1.4.1\x86\lib\
USERNAME = Matteo
OneDrive = C:\Users\sbern\OneDrive
AMPLITUDE_API_KEY_YELLOWBUCKET_PROD = e03a9bbe92dc38a88cdb068d24c65b46
PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
AMPLITUDE_TOKEN_REDBUCKET_PROD = jTIgKs5KTZOjiqEEVdZFbgo_VRhABduL
__PSLockDownPolicy = 0
NUMBER_OF_PROCESSORS = 12
AMPLITUDE_TOKEN_GREENBUCKET_DEV = 84H2gMm_FJzhr3mBaX1lM1JVukmCM7d9
AMPLITUDE_DEPLOYMENT_KEY_RED_BUCKET_DEV = client-wbjHYrmeSR87GmWOE7LDpf7sUySOIKHm
AMPLITUDE_API_KEY_GREENBUCKET_PROD = c86fea37a9e1d3f0878b96e15b111c7c
ComSpec = C:\Windows\system32\cmd.exe
ORIGINAL_XDG_CURRENT_DESKTOP = undefined
PROCESSOR_REVISION = 0802
AMPLITUDE_DEPLOYMENT_KEY_RED_BUCKET_PROD = client-zH8Y7OK1i331EKuG77C6UxN8ygcM6LzS
TMP = C:\Users\sbern\AppData\Local\Temp
SystemDrive = C:
AMPLITUDE_API_KEY = 28f3cae0b33b8b3702120c9ed1a935aa
FPS_BROWSER_APP_PROFILE_STRING = Internet Explorer
SENTRY_ACCESS_TOKEN = 3df78d9e53f8456aa90fbae044ce1a6261421ab1d0014674bc2e933477289017
APPDATA = C:\Users\sbern\AppData\Roaming
Path = C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\dotnet\;C:\Users\sbern\AppData\Local\Microsoft\WindowsApps;
PSModulePath = C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
LOCALAPPDATA = C:\Users\sbern\AppData\Local
USERPROFILE = C:\Users\sbern
WOOTRIC_CLIENT_TOKEN = NPS-aa8be4c3


stderr[

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':launcher:mapReleaseSourceSetPaths'.
> Could not resolve all files for configuration ':launcher:releaseRuntimeClasspath'.
   > Could not find com.google.games:gpgs-plugin-support:0.10.14.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/google/games/gpgs-plugin-support/0.10.14/gpgs-plugin-support-0.10.14.pom
       - https://repo.maven.apache.org/maven2/com/google/games/gpgs-plugin-support/0.10.14/gpgs-plugin-support-0.10.14.pom
       - file:/C:/The workshop II/Donut Roller 2020/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/gpgs-plugin-support-0.10.14.jar
       - file:/C:/The workshop II/Donut Roller 2020/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/gpgs-plugin-support.jar
     Required by:
         project :launcher > project :unityLibrary

* 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:
java.lang.StackOverflowError (no error message)

* 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 5s
]
stdout[

> Configure project :launcher
WARNING:The option setting 'android.aapt2FromMavenOverride=C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\34.0.0\aapt2.exe' is experimental.
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:GoogleMobileAdsPlugin.androidlib
WARNING:Using flatDir should be avoided because it doesn't support any meta-data formats.
WARNING:minSdkVersion (22) is greater than targetSdkVersion (16) for variant "debug". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.
WARNING:minSdkVersion (22) is greater than targetSdkVersion (16) for variant "release". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.

> Configure project :unityLibrary:GooglePlayGamesManifest.androidlib
WARNING:Using flatDir should be avoided because it doesn't support any meta-data formats.
WARNING:minSdkVersion (22) is greater than targetSdkVersion (16) for variant "debug". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.
WARNING:minSdkVersion (22) is greater than targetSdkVersion (16) for variant "release". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.

> Configure project :unityLibrary:GooglePlayGamesManifest.plugin
WARNING:Using flatDir should be avoided because it doesn't support any meta-data formats.
WARNING:minSdkVersion (22) is greater than targetSdkVersion (16) for variant "debug". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.
WARNING:minSdkVersion (22) is greater than targetSdkVersion (16) for variant "release". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\34.0.0\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-33\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-34\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-35\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\34.0.0\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-33\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-34\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-35\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.51f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only

> Task :unityLibrary:preBuild UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preBuild UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:preBuild UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:preBuild UP-TO-DATE
> Task :unityLibrary:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseRenderscript NO-SOURCE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:packageReleaseRenderscript NO-SOURCE
> Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:packageReleaseRenderscript NO-SOURCE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:generateReleaseResValues UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResValues UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResources UP-TO-DATE
> Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:generateReleaseResValues UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:generateReleaseResValues UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:generateReleaseResources UP-TO-DATE
> Task :unityLibrary:generateReleaseResources UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:generateReleaseResources UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:packageReleaseResources UP-TO-DATE
> Task :unityLibrary:packageReleaseResources UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseResources UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:packageReleaseResources UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:extractDeepLinksRelease UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:extractDeepLinksRelease UP-TO-DATE
> Task :unityLibrary:extractDeepLinksRelease UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:extractDeepLinksRelease UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:processReleaseManifest UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseManifest UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:processReleaseManifest UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:compileReleaseLibraryResources UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:compileReleaseLibraryResources UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseLibraryResources UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:compileReleaseAidl NO-SOURCE
> Task :unityLibrary:GooglePlayGamesManifest.plugin:compileReleaseAidl NO-SOURCE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseAidl NO-SOURCE
> Task :unityLibrary:compileReleaseLibraryResources UP-TO-DATE
> Task :unityLibrary:compileReleaseAidl NO-SOURCE
> Task :unityLibrary:generateReleaseBuildConfig UP-TO-DATE
> Task :unityLibrary:processReleaseManifest
> Task :launcher:preBuild UP-TO-DATE
> Task :launcher:preReleaseBuild UP-TO-DATE
> Task :launcher:compileReleaseRenderscript NO-SOURCE
> Task :launcher:generateReleaseResValues UP-TO-DATE
> Task :launcher:mapReleaseSourceSetPaths FAILED
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:parseReleaseLocalResources
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:parseReleaseLocalResources
> Task :unityLibrary:GooglePlayGamesManifest.plugin:parseReleaseLocalResources
> Task :unityLibrary:parseReleaseLocalResources
27 actionable tasks: 6 executed, 21 up-to-date
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <ac8a47e1c334495ba26e99ed68cd7eb6>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <ac8a47e1c334495ba26e99ed68cd7eb6>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <ac8a47e1c334495ba26e99ed68cd7eb6>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <ac8a47e1c334495ba26e99ed68cd7eb6>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action`1[T] progress) (at <ac8a47e1c334495ba26e99ed68cd7eb6>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action`1[T] progress) (at <ac8a47e1c334495ba26e99ed68cd7eb6>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <ac8a47e1c334495ba26e99ed68cd7eb6>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <ac8a47e1c334495ba26e99ed68cd7eb6>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Build completed with a result of 'Failed' in 29 seconds (28520 ms)
3 errors
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

I am trying and trying, I keep searching the forums and the internet and I cannot find a solution. Changing build target does not help.

I’ve solved the “minsdk” and “targetsdk” by hunting the mismatching values in all the manifest files, but the other errors still persists.

Good work on sorting the minsdk / targetsdk stuff out… keep up the good work.

How to troubleshoot build failures:

Obviously, if there is actionable data, clues or information within any of the errors, fix those problems. Each error entry may have more information than can fit in the console log so select each error and read the expanded view below it.

If that gives you nothing worthwhile (look to Google! You’re never the first one!), then…

First, make a blank project with a single blank scene and prove that it builds successfully.

If the blank project does NOT build, go fix your Unity installation or your other tools, such as Android SDK, NDK, JDK, etc. It may even be necessary to change to a different version of Unity3D. It is generally best to stay with LTS versions of Unity3D.

Until you can build a blank project to the target platform, don’t fiddle with anything else.

Once you can build a blank project, now bisect the problem by bringing over parts of your current project and building it one subsystem at a time, perhaps stubbing things out that might trigger compiler errors.

Most often things that prevent building are third-party libraries such as Firebase.

Once you identify the subsystem, go to the documentation for it and make sure you are doing it correctly.

It may also be helpful to work through a tutorial or two for whatever subsystem is making the build fail.

Android build not building:

Circa July 2022 here have been reports of Unity’s installer failing to install the Android Tools.

Here was how I brought up Unity2020.3.41 and the Android SDK 31 on October 30, 2022 (edited on August 23, 2023 to include Android SDK 33…) (and again for SDK34):

Android Gradle errors and other related stuff:

I’ve done the first step: building a blank project. It succeeded.

Cool. Now do the second step, bisecting back to your other project to find the offending thing that isn’t building, either because it won’t, it can’t, it isn’t configured, or some other error.

The problem seems to appear when I add GoogleMobileAds-v9.3.0.unitypackage OR CloudOnce v2.7.5 to the new project.

But since I updated them because I thought these were causing an error, my solution is simply to roll back to a previous backup. Luckily it was just short to a slight modification to the main manifest to be up to date again. I will go with an outdated AdMob package, CloudOnce and with the legacy Unity Ads (I cannot really think to update to levelplay in these conditions) for the time being.