java.io.IOException: Can't read. In unity when I try to build my game

I have a problem when I try to build my game it shows me this error: java.io.IOException: Can’t read [C:\Users\niksr\OneDrive\Documents\Unity\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-33\optional\android.car.jar] (Can’t process class [android/car/Car$CarServiceLifecycleListener.class] (Unsupported version number [55.0] (maximum 54.0, Java 10))) See the Console for Details.

Before this, I was able to build my game. I was really close to publishing it on the play store, but it said “Your app currently targets API level 30 and must target at least API level 31 to ensure it is built on the latest APIs optimized for security and performance. Change your app’s target API level to at least 31.”. I changed it to 33, but then I tried to build my game and this error showed up. After that, I changed it back to the original API level, but this error still showed up. I don’t know why this error persists, but please help me solve this problem.
More errors:

Configure project :launcher
WARNING: The option setting ‘android.enableR8=false’ is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
Task :launcher:preBuild UP-TO-DATE
Task :unityLibrary:preBuild UP-TO-DATE
Task :unityLibrary:preReleaseBuild UP-TO-DATE
Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
Task :launcher:extractProguardFiles UP-TO-DATE
Task :launcher:preReleaseBuild UP-TO-DATE
Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
Task :launcher:compileReleaseRenderscript NO-SOURCE
Task :launcher:generateReleaseResValues UP-TO-DATE
Task :unityLibrary:generateReleaseResValues UP-TO-DATE
Task :launcher:generateReleaseResources UP-TO-DATE
Task :unityLibrary:generateReleaseResources UP-TO-DATE
Task :launcher:createReleaseCompatibleScreenManifests
Task :launcher:extractDeepLinksRelease UP-TO-DATE
Task :launcher:checkReleaseDuplicateClasses UP-TO-DATE
Task :launcher:generateReleaseBuildConfig UP-TO-DATE
Task :launcher:javaPreCompileRelease UP-TO-DATE
Task :launcher:processReleaseJavaRes NO-SOURCE
Task :launcher:mergeReleaseShaders UP-TO-DATE
Task :launcher:compileReleaseShaders NO-SOURCE
Task :launcher:generateReleaseAssets UP-TO-DATE
Task :launcher:mergeReleaseJniLibFolders UP-TO-DATE
Task :launcher:collectReleaseDependencies UP-TO-DATE
Task :launcher:configureReleaseDependencies UP-TO-DATE
Task :launcher:parseReleaseIntegrityConfig UP-TO-DATE
Task :launcher:validateSigningRelease UP-TO-DATE
Task :unityLibrary:packageReleaseResources
Task :unityLibrary:extractDeepLinksRelease UP-TO-DATE
Task :unityLibrary:compileReleaseLibraryResources UP-TO-DATE
Task :unityLibrary:compileReleaseAidl NO-SOURCE
Task :unityLibrary:generateReleaseBuildConfig UP-TO-DATE
Task :unityLibrary:parseReleaseLocalResources UP-TO-DATE
Task :unityLibrary:javaPreCompileRelease UP-TO-DATE
Task :unityLibrary:processReleaseJavaRes NO-SOURCE
Task :unityLibrary:bundleLibResRelease NO-SOURCE
Task :unityLibrary:mergeReleaseShaders UP-TO-DATE
Task :unityLibrary:compileReleaseShaders NO-SOURCE
Task :unityLibrary:generateReleaseAssets UP-TO-DATE
Task :unityLibrary:packageReleaseAssets
Task :launcher:compileReleaseAidl NO-SOURCE
Task :launcher:mergeReleaseJavaResource UP-TO-DATE
Task :launcher:mergeReleaseAssets
Task :unityLibrary:mergeReleaseJniLibFolders
Task :unityLibrary:processReleaseManifest
Task :unityLibrary:generateReleaseRFile UP-TO-DATE
Task :launcher:mergeReleaseResources
Task :unityLibrary:compileReleaseJavaWithJavac UP-TO-DATE
Task :unityLibrary:mergeReleaseGeneratedProguardFiles UP-TO-DATE
Task :unityLibrary:exportReleaseConsumerProguardFiles UP-TO-DATE
Task :unityLibrary:mergeReleaseNativeLibs
Task :unityLibrary:bundleLibCompileToJarRelease UP-TO-DATE
Task :unityLibrary:bundleLibRuntimeToJarRelease UP-TO-DATE
Task :unityLibrary:stripReleaseDebugSymbols
Task :launcher:processReleaseManifest
Task :unityLibrary:copyReleaseJniLibsProjectOnly
aapt2.exe W 08-31 22:38:39 24016 5532 LoadedArsc.cpp:657] Unknown chunk type ‘200’.
aapt2.exe W 08-31 22:38:39 14572 27228 LoadedArsc.cpp:657] Unknown chunk type ‘200’.
Task :launcher:processReleaseResources
Task :launcher:compileReleaseJavaWithJavac UP-TO-DATE
Task :launcher:mergeReleaseGeneratedProguardFiles UP-TO-DATE
Task :launcher:minifyReleaseWithProguard FAILED
ProGuard, version 6.0.3
Reading input…
Reading program jar [C:\Users\niksr\OneDrive\Documents\Unity\FlappyRemake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\libs\unity-classes.jar] (filtered)
Reading program jar [C:\Users\niksr.gradle\caches\transforms-2\files-2.1\f381e2abc8fef9b30c071e6331c67d73\UnityAds-runtime.jar] (filtered)
Reading program jar [C:\Users\niksr.gradle\caches\transforms-2\files-2.1\aa64ac21301b853e31609ba1c90691b6\UnityAdsAndroidPlugin-runtime.jar] (filtered)
Reading program jar [C:\Users\niksr\OneDrive\Documents\Unity\FlappyRemake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\build\intermediates\runtime_library_classes_jar\release\classes.jar] (filtered)
Reading program jar [C:\Users\niksr\OneDrive\Documents\Unity\FlappyRemake\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\build\intermediates\compile_and_runtime_not_namespaced_r_class_jar\release\R.jar] (filtered)
Reading program directory [C:\Users\niksr\OneDrive\Documents\Unity\FlappyRemake\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\build\intermediates\javac\release\classes] (filtered)
Reading program jar [C:\Users\niksr\OneDrive\Documents\Unity\FlappyRemake\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\build\intermediates\merged_java_res\release\out.jar] (filtered)
Reading library jar [C:\Users\niksr\OneDrive\Documents\Unity\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-33\android.jar]
Reading library jar [C:\Users\niksr\OneDrive\Documents\Unity\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\core-lambda-stubs.jar]
Reading library jar [C:\Users\niksr\OneDrive\Documents\Unity\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-33\optional\org.apache.http.legacy.jar]
Reading library jar [C:\Users\niksr\OneDrive\Documents\Unity\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-33\optional\android.car.jar]
Task :launcher:bundleReleaseResources
42 actionable tasks: 14 executed, 28 up-to-date
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Another error:
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: unexpected element (uri:“”, local:“extension-level”). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
Warning: unexpected element (uri:“”, local:“base-extension”). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:launcher:minifyReleaseWithProguard’.

java.io.IOException: Can’t read [C:\Users\niksr\OneDrive\Documents\Unity\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-33\optional\android.car.jar] (Can’t process class [android/car/Car$CarServiceLifecycleListener.class] (Unsupported version number [55.0] (maximum 54.0, Java 10)))

  • 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
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    Another one:
    CommandInvokationFailure: Gradle build failed.
    C:\Users\niksr\OneDrive\Documents\Unity\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath “C:\Users\niksr\OneDrive\Documents\Unity\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-6.1.1.jar” org.gradle.launcher.GradleMain “-Dorg.gradle.jvmargs=-Xmx4096m” “bundleRelease”
    Environment Variables:
    GPU_MAX_ALLOC_PERCENT = 100
    USERDOMAIN = LAPTOP-4AEK3MIH
    ProgramFiles = C:\Program Files
    TMP = C:\Users\niksr\AppData\Local\Temp
    PROCESSOR_ARCHITECTURE = AMD64
    PROCESSOR_REVISION = 6001
    OneDriveConsumer = C:\Users\niksr\OneDrive
    OS = Windows_NT
    GPU_USE_SYNC_OBJECTS = 1
    PROCESSOR_IDENTIFIER = AMD64 Family 23 Model 96 Stepping 1, AuthenticAMD
    ProgramW6432 = C:\Program Files
    GPU_MAX_HEAP_SIZE = 100
    USERPROFILE = C:\Users\niksr
    JAVA_HOME = C:\Users\niksr\OneDrive\Documents\Unity\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK
    CommonProgramFiles = C:\Program Files\Common Files
    DriverData = C:\Windows\System32\Drivers\DriverData
    ComSpec = C:\WINDOWS\system32\cmd.exe
    LOGONSERVER = \LAPTOP-4AEK3MIH
    PSModulePath = C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
    ANDROID_NDK_ROOT = C:\Users\niksr\OneDrive\Documents\Unity\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK
    USERNAME = niksr
    NUMBER_OF_PROCESSORS = 8
    JAVA_TOOL_OPTIONS = -Dfile.encoding=UTF-8
    BURST_ANDROID_MIN_API_LEVEL = 22
    FPS_BROWSER_APP_PROFILE_STRING = Internet Explorer
    GPU_SINGLE_ALLOC_PERCENT = 100
    TEMP = C:\Users\niksr\AppData\Local\Temp
    Path = C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Gemalto\Classic Client\BIN;C:\Program Files (x86)\Gemalto\Classic Client\BIN;C:\Program Files (x86)\IDEMIA\AWP\Dlls;C:\Program Files\IDEMIA\AWP\Dlls;C:\Users\niksr\AppData\Local\Programs\Python\Python39\Scripts;C:\Users\niksr\AppData\Local\Programs\Python\Python39;C:\Users\niksr\AppData\Local\Microsoft\WindowsApps;;C:\Users\niksr\AppData\Local\Programs\Microsoft VS Code\bin
    COMPUTERNAME = LAPTOP-4AEK3MIH
    PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    ALLUSERSPROFILE = C:\ProgramData
    SystemDrive = C:
    windir = C:\WINDOWS
    FPS_BROWSER_USER_PROFILE_STRING = Default
    HOMEPATH = \Users\niksr
    PUBLIC = C:\Users\Public
    CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
    APPDATA = C:\Users\niksr\AppData\Roaming
    OneDrive = C:\Users\niksr\OneDrive
    PROCESSOR_LEVEL = 23
    CommonProgramW6432 = C:\Program Files\Common Files
    ProgramFiles(x86) = C:\Program Files (x86)
    SystemRoot = C:\WINDOWS
    SESSIONNAME = Console
    GPU_FORCE_64BIT_PTR = 0
    LOCALAPPDATA = C:\Users\niksr\AppData\Local
    VBOX_HWVIRTEX_IGNORE_SVM_IN_USE = 1
    HOMEDRIVE = C:
    USERDOMAIN_ROAMINGPROFILE = LAPTOP-4AEK3MIH
    ProgramData = C:\ProgramData
    ORIGINAL_XDG_CURRENT_DESKTOP = undefined
    stderr[
    Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Warning: unexpected element (uri:“”, local:“extension-level”). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
    Warning: unexpected element (uri:“”, local:“base-extension”). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
    FAILURE: Build failed with an exception.
  • What went wrong:
    Execution failed for task ‘:launcher:minifyReleaseWithProguard’.

java.io.IOException: Can’t read [C:\Users\niksr\OneDrive\Documents\Unity\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-33\optional\android.car.jar] (Can’t process class [android/car/Car$CarServiceLifecycleListener.class] (Unsupported version number [55.0] (maximum 54.0, Java 10)))

  • 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
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    ]
    stdout[

Configure project :launcher
WARNING: The option setting ‘android.enableR8=false’ is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
Task :launcher:preBuild UP-TO-DATE
Task :unityLibrary:preBuild UP-TO-DATE
Task :unityLibrary:preReleaseBuild UP-TO-DATE
Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
Task :launcher:extractProguardFiles UP-TO-DATE
Task :launcher:preReleaseBuild UP-TO-DATE
Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
Task :launcher:compileReleaseRenderscript NO-SOURCE
Task :launcher:generateReleaseResValues UP-TO-DATE
Task :unityLibrary:generateReleaseResValues UP-TO-DATE
Task :launcher:generateReleaseResources UP-TO-DATE
Task :unityLibrary:generateReleaseResources UP-TO-DATE
Task :launcher:createReleaseCompatibleScreenManifests
Task :launcher:extractDeepLinksRelease UP-TO-DATE
Task :launcher:checkReleaseDuplicateClasses UP-TO-DATE
Task :launcher:generateReleaseBuildConfig UP-TO-DATE
Task :launcher:javaPreCompileRelease UP-TO-DATE
Task :launcher:processReleaseJavaRes NO-SOURCE
Task :launcher:mergeReleaseShaders UP-TO-DATE
Task :launcher:compileReleaseShaders NO-SOURCE
Task :launcher:generateReleaseAssets UP-TO-DATE
Task :launcher:mergeReleaseJniLibFolders UP-TO-DATE
Task :launcher:collectReleaseDependencies UP-TO-DATE
Task :launcher:configureReleaseDependencies UP-TO-DATE
Task :launcher:parseReleaseIntegrityConfig UP-TO-DATE
Task :launcher:validateSigningRelease UP-TO-DATE
Task :unityLibrary:packageReleaseResources
Task :unityLibrary:extractDeepLinksRelease UP-TO-DATE
Task :unityLibrary:compileReleaseLibraryResources UP-TO-DATE
Task :unityLibrary:compileReleaseAidl NO-SOURCE
Task :unityLibrary:generateReleaseBuildConfig UP-TO-DATE
Task :unityLibrary:parseReleaseLocalResources UP-TO-DATE
Task :unityLibrary:javaPreCompileRelease UP-TO-DATE
Task :unityLibrary:processReleaseJavaRes NO-SOURCE
Task :unityLibrary:bundleLibResRelease NO-SOURCE
Task :unityLibrary:mergeReleaseShaders UP-TO-DATE
Task :unityLibrary:compileReleaseShaders NO-SOURCE
Task :unityLibrary:generateReleaseAssets UP-TO-DATE
Task :unityLibrary:packageReleaseAssets
Task :launcher:compileReleaseAidl NO-SOURCE
Task :launcher:mergeReleaseJavaResource UP-TO-DATE
Task :launcher:mergeReleaseAssets
Task :unityLibrary:mergeReleaseJniLibFolders
Task :unityLibrary:processReleaseManifest
Task :unityLibrary:generateReleaseRFile UP-TO-DATE
Task :launcher:mergeReleaseResources
Task :unityLibrary:compileReleaseJavaWithJavac UP-TO-DATE
Task :unityLibrary:mergeReleaseGeneratedProguardFiles UP-TO-DATE
Task :unityLibrary:exportReleaseConsumerProguardFiles UP-TO-DATE
Task :unityLibrary:mergeReleaseNativeLibs
Task :unityLibrary:bundleLibCompileToJarRelease UP-TO-DATE
Task :unityLibrary:bundleLibRuntimeToJarRelease UP-TO-DATE
Task :unityLibrary:stripReleaseDebugSymbols
Task :launcher:processReleaseManifest
Task :unityLibrary:copyReleaseJniLibsProjectOnly
aapt2.exe W 08-31 22:38:39 24016 5532 LoadedArsc.cpp:657] Unknown chunk type ‘200’.
aapt2.exe W 08-31 22:38:39 14572 27228 LoadedArsc.cpp:657] Unknown chunk type ‘200’.
Task :launcher:processReleaseResources
Task :launcher:compileReleaseJavaWithJavac UP-TO-DATE
Task :launcher:mergeReleaseGeneratedProguardFiles UP-TO-DATE
Task :launcher:minifyReleaseWithProguard FAILED
ProGuard, version 6.0.3
Reading input…
Reading program jar [C:\Users\niksr\OneDrive\Documents\Unity\FlappyRemake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\libs\unity-classes.jar] (filtered)
Reading program jar [C:\Users\niksr.gradle\caches\transforms-2\files-2.1\f381e2abc8fef9b30c071e6331c67d73\UnityAds-runtime.jar] (filtered)
Reading program jar [C:\Users\niksr.gradle\caches\transforms-2\files-2.1\aa64ac21301b853e31609ba1c90691b6\UnityAdsAndroidPlugin-runtime.jar] (filtered)
Reading program jar [C:\Users\niksr\OneDrive\Documents\Unity\FlappyRemake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\build\intermediates\runtime_library_classes_jar\release\classes.jar] (filtered)
Reading program jar [C:\Users\niksr\OneDrive\Documents\Unity\FlappyRemake\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\build\intermediates\compile_and_runtime_not_namespaced_r_class_jar\release\R.jar] (filtered)
Reading program directory [C:\Users\niksr\OneDrive\Documents\Unity\FlappyRemake\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\build\intermediates\javac\release\classes] (filtered)
Reading program jar [C:\Users\niksr\OneDrive\Documents\Unity\FlappyRemake\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\build\intermediates\merged_java_res\release\out.jar] (filtered)
Reading library jar [C:\Users\niksr\OneDrive\Documents\Unity\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-33\android.jar]
Reading library jar [C:\Users\niksr\OneDrive\Documents\Unity\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\core-lambda-stubs.jar]
Reading library jar [C:\Users\niksr\OneDrive\Documents\Unity\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-33\optional\org.apache.http.legacy.jar]
Reading library jar [C:\Users\niksr\OneDrive\Documents\Unity\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-33\optional\android.car.jar]
Task :launcher:bundleReleaseResources
42 actionable tasks: 14 executed, 28 up-to-date
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <4a8943a7ff7048deb64e0a5059f78d1d>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <4a8943a7ff7048deb64e0a5059f78d1d>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <4a8943a7ff7048deb64e0a5059f78d1d>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action1[T] progress, System.String error) (at <4a8943a7ff7048deb64e0a5059f78d1d>:0) UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action1[T] progress) (at <4a8943a7ff7048deb64e0a5059f78d1d>: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 <4a8943a7ff7048deb64e0a5059f78d1d>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <4a8943a7ff7048deb64e0a5059f78d1d>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <4a8943a7ff7048deb64e0a5059f78d1d>:0)
Rethrow as BuildFailedException: Exception of type ‘UnityEditor.Build.BuildFailedException’ was thrown.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <4a8943a7ff7048deb64e0a5059f78d1d>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <4a8943a7ff7048deb64e0a5059f78d1d>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, AndroidPlayerBuildProgram.Data.AndroidPlayerBuildProgramOutput buildProgramOutput) (at <4a8943a7ff7048deb64e0a5059f78d1d>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <4a8943a7ff7048deb64e0a5059f78d1d>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <5f40cdb07bd44d76a23dad985a4ec283>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Another one:
Build completed with a result of ‘Failed’ in 38 seconds (38134 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Last one:
UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <5f40cdb07bd44d76a23dad985a4ec283>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <5f40cdb07bd44d76a23dad985a4ec283>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Please help! I have no idea what I can do.

@unity_60AB1EE5CDB300328356 (that is one long username). OneDrive? Have you tried a local drive? Also try with a new/empty project to compare, and see if that works.

That’s what I was thinking of doing.

Any solutions?

In Publishing Setting, under Minify section, enable “Use R8” and make build with target api set to 33. For more information on Minify, can check, https://forum.unity.com/threads/wha…-should-i-change-it-before-publishing.870061/

9 Likes

Thank you, it worked…

1 Like

Also came here to say that I was experiencing the same issue, and ticking the “Use R8” box made this problem with targetting API 33 go away. Not sure why this is required to target that API and wish it was a bit more consistent from the Unity side. Apps/Games and any updates to these need to be built to target API33 from August this year.

1 Like

Hi,
do you have the same issue that after R8 is a obligatory to succeed a build, when uploading build to Google Play you cannot attach mapping file,
and afterwards get the warning:
“There is no deobfuscation file associated with this App Bundle. If you use obfuscated code (R8/proguard), uploading a deobfuscation file will make crashes and ANRs easier to analyze and debug. Using R8/proguard can help reduce app size” ?

I think this bug is related strictly to it:

I had this error. After hours, i tried to patch and run it as development build to my device and it worked. But i could still not build normal without this error. I set my minimum and target API level to 30 and after that it could build again, although, i’ve tried to build with this API level before. Only after patching, it worked.

9226200--1288422--upload_2023-8-16_9-8-27.png9226200--1288425--upload_2023-8-16_9-9-1.png

9226200--1288422--upload_2023-8-16_9-8-27.png

Muito obg tava ja a 1 semana quebrando cabeça

1 Like