I am attempting to upload an .AAB file Google Play Console which requires an API level of 31 or higher. But targeting an API higher than 30 in Unity results in a build failure. Below are my error logs. Any guidance would be appreciated.
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:launcher:minifyReleaseWithProguard’.
java.io.IOException: Can’t read [/Applications/Unity/Hub/Editor/2021.3.8f1/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 3s
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
NEXT
CommandInvokationFailure: Gradle build failed.
/Applications/Unity/Hub/Editor/2021.3.8f1/PlaybackEngines/AndroidPlayer/OpenJDK/bin/java -classpath “/Applications/Unity/Hub/Editor/2021.3.8f1/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-6.1.1.jar” org.gradle.launcher.GradleMain “-Dorg.gradle.jvmargs=-Xmx4096m” “bundleRelease”
Environment Variables:
BURST_ANDROID_MIN_API_LEVEL = 22
XPC_FLAGS = 0x0
JAVA_TOOL_OPTIONS = -Dfile.encoding=UTF-8
PATH = /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
TMPDIR = /var/folders/c0/r692bsvn4sg6_wh6w21f6xzm0000gn/T/
SHELL = /bin/zsh
SSH_AUTH_SOCK = /private/tmp/com.apple.launchd.ivEgkKXhAB/Listeners
HOME = /Users/pauldesautels
__CFBundleIdentifier = com.unity3d.unityhub
USER = pauldesautels
__CF_USER_TEXT_ENCODING = 0x1F5:0x0:0x52
LOGNAME = pauldesautels
ORIGINAL_XDG_CURRENT_DESKTOP = undefined
JAVA_HOME = /Applications/Unity/Hub/Editor/2021.3.8f1/PlaybackEngines/AndroidPlayer/OpenJDK
ANDROID_NDK_ROOT = /Applications/Unity/Hub/Editor/2021.3.8f1/PlaybackEngines/AndroidPlayer/NDK
XPC_SERVICE_NAME = application.com.unity3d.unityhub.14286249.14286255
COMMAND_MODE = unix2003
stderr[
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:launcher:minifyReleaseWithProguard’.
java.io.IOException: Can’t read [/Applications/Unity/Hub/Editor/2021.3.8f1/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 3s
]
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 :UnityDataAssetPack:generateAssetPackManifest UP-TO-DATE
Task :launcher:extractProguardFiles UP-TO-DATE
Task :launcher:preReleaseBuild UP-TO-DATE
Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
Task :unityLibrary:generateReleaseResValues UP-TO-DATE
Task :unityLibrary:generateReleaseResources UP-TO-DATE
Task :unityLibrary:packageReleaseResources UP-TO-DATE
Task :launcher:processReleaseAssetPackManifests UP-TO-DATE
Task :launcher:linkReleaseManifestForAssetPacks UP-TO-DATE
Task :unityLibrary:extractDeepLinksRelease UP-TO-DATE
Task :unityLibrary:processReleaseManifest 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 :launcher:assetPackReleasePreBundleTask UP-TO-DATE
Task :launcher:compileReleaseRenderscript NO-SOURCE
Task :launcher:generateReleaseResValues UP-TO-DATE
Task :launcher:generateReleaseResources UP-TO-DATE
Task :unityLibrary:packageReleaseAssets
Task :launcher:mergeReleaseResources UP-TO-DATE
Task :launcher:createReleaseCompatibleScreenManifests UP-TO-DATE
Task :launcher:extractDeepLinksRelease UP-TO-DATE
Task :unityLibrary:mergeReleaseJniLibFolders
Task :launcher:processReleaseManifest UP-TO-DATE
Task :unityLibrary:generateReleaseRFile UP-TO-DATE
Task :launcher:bundleReleaseResources UP-TO-DATE
Task :launcher:checkReleaseDuplicateClasses UP-TO-DATE
Task :launcher:compileReleaseAidl NO-SOURCE
Task :unityLibrary:compileReleaseJavaWithJavac UP-TO-DATE
Task :launcher:generateReleaseBuildConfig UP-TO-DATE
Task :unityLibrary:mergeReleaseGeneratedProguardFiles UP-TO-DATE
Task :launcher:javaPreCompileRelease UP-TO-DATE
Task :unityLibrary:exportReleaseConsumerProguardFiles UP-TO-DATE
Task :unityLibrary:bundleLibCompileToJarRelease UP-TO-DATE
Task :unityLibrary:bundleLibRuntimeToJarRelease UP-TO-DATE
Task :launcher:processReleaseResources UP-TO-DATE
Task :unityLibrary:mergeReleaseNativeLibs
Task :launcher:compileReleaseJavaWithJavac UP-TO-DATE
Task :unityLibrary:stripReleaseDebugSymbols
Task :launcher:mergeReleaseGeneratedProguardFiles UP-TO-DATE
Task :launcher:processReleaseJavaRes NO-SOURCE
Task :launcher:mergeReleaseJavaResource UP-TO-DATE
Task :unityLibrary:copyReleaseJniLibsProjectOnly
Task :launcher:minifyReleaseWithProguard FAILED
ProGuard, version 6.0.3
Reading input…
Reading program jar [/Users/pauldesautels/Documents/Pabloware/LEGENDARY_LARRY/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/unity-classes.jar] (filtered)
Reading program jar [/Users/pauldesautels/.gradle/caches/transforms-2/files-2.1/b6257d464e65990d4b3bc83730a9e910/UnityAds-runtime.jar] (filtered)
Reading program jar [/Users/pauldesautels/.gradle/caches/transforms-2/files-2.1/f50f8f4811bb1868446a8fa8c1e81c2d/common-runtime.jar] (filtered)
Reading program jar [/Users/pauldesautels/.gradle/caches/transforms-2/files-2.1/309637c8fe751374308e3a44ad5c886d/billing-4.0.0-runtime.jar] (filtered)
Reading program jar [/Users/pauldesautels/.gradle/caches/transforms-2/files-2.1/6e1f69c9173f6b668c6234c95ac4c036/core-1.10.0-runtime.jar] (filtered)
Reading program jar [/Users/pauldesautels/Documents/Pabloware/LEGENDARY_LARRY/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/build/intermediates/runtime_library_classes_jar/release/classes.jar] (filtered)
Reading program jar [/Users/pauldesautels/Documents/Pabloware/LEGENDARY_LARRY/Library/Bee/Android/Prj/IL2CPP/Gradle/launcher/build/intermediates/compile_and_runtime_not_namespaced_r_class_jar/release/R.jar] (filtered)
Reading program directory [/Users/pauldesautels/Documents/Pabloware/LEGENDARY_LARRY/Library/Bee/Android/Prj/IL2CPP/Gradle/launcher/build/intermediates/javac/release/classes] (filtered)
Reading program jar [/Users/pauldesautels/Documents/Pabloware/LEGENDARY_LARRY/Library/Bee/Android/Prj/IL2CPP/Gradle/launcher/build/intermediates/merged_java_res/release/out.jar] (filtered)
Reading library jar [/Applications/Unity/Hub/Editor/2021.3.8f1/PlaybackEngines/AndroidPlayer/SDK/platforms/android-33/android.jar]
Reading library jar [/Applications/Unity/Hub/Editor/2021.3.8f1/PlaybackEngines/AndroidPlayer/SDK/build-tools/30.0.2/core-lambda-stubs.jar]
Reading library jar [/Applications/Unity/Hub/Editor/2021.3.8f1/PlaybackEngines/AndroidPlayer/SDK/platforms/android-33/optional/org.apache.http.legacy.jar]
Reading library jar [/Applications/Unity/Hub/Editor/2021.3.8f1/PlaybackEngines/AndroidPlayer/SDK/platforms/android-33/optional/android.car.jar]
39 actionable tasks: 6 executed, 33 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.Action
1[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 /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:370)