Hi everyone. I’m working on a game and I got an email saying that we need to upgrade the SDK before the end of August, so I decided to update it to SDK 35 with is the last one. So I will not have to redo this soon.
After I did that, I was not able anymore to build my project. It was a project with Unity 2021.xx, so I decided to upgrade it to the latest version of Unity (6000.0.14f1), which didn’t fix the issue.
I did a lot of research and try a billions things. I reimported the asset. I did “force resolve” on the Android Resolver. It now works, but when I built I still got the error. I can run the game.
I have:
Android Resolver 1.2.182
Advertisement Legacy 4.12.0
Authentification 3.3.3
JetBrains Rider Editor 3.0.31
Leaderboards 2.1.0
Test Framework 1.4
Timeline 1.8.7
Toolchain Win Linux x64 2.0.9
Unity UI 2.0.0
Universal RP 17.0.3
Version Control 2.4.4
Visual Scripting 1.9.4
Visual Studio Editor 2.0.22
Please help me! Already lost 2 weeks on that T_T The error message is:
CommandInvokationFailure: Gradle build failed.
C:\Program Files\Unity\Hub\Editor\6000.0.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\6000.0.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-8.4.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "bundleRelease"
Environment Variables:
AMPLITUDE_API_KEY_REDBUCKET_DEV = 46b8b46515e7632fc42a504b72e05fd0
USERDOMAIN = DESKTOP-0NIFP31
ProgramFiles = C:\Program Files
AMPLITUDE_API_KEY_GREENBUCKET_DEV = 3ded2a762163603391a425f688f990c8
USERPROFILE = C:\Users\joest
OneDrive = C:\Users\joest\OneDrive
PROCESSOR_ARCHITECTURE = AMD64
PROCESSOR_REVISION = 5e03
OS = Windows_NT
CHROME_CRASHPAD_PIPE_NAME = \\.\pipe\crashpad_8076_SIBXHJATCCHITBAA
PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
AMPLITUDE_TOKEN_REDBUCKET_DEV = U4PSN7S7PuYVRODivvdcFwbu8R6IHGqa
ProgramW6432 = C:\Program Files
AMPLITUDE_API_KEY_GREENBUCKET_PROD = c86fea37a9e1d3f0878b96e15b111c7c
CommonProgramFiles = C:\Program Files\Common Files
SENTRY_ACCESS_TOKEN = 3df78d9e53f8456aa90fbae044ce1a6261421ab1d0014674bc2e933477289017
JAVA_HOME = C:\Program Files\Unity\Hub\Editor\6000.0.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK
AMPLITUDE_DEPLOYMENT_KEY_RED_BUCKET_DEV = client-wbjHYrmeSR87GmWOE7LDpf7sUySOIKHm
AMPLITUDE_TOKEN_GREENBUCKET_PROD = ZpUcbAdZXJYzNSoHsAWtL_s_JppwWid9
ComSpec = C:\Windows\system32\cmd.exe
AMPLITUDE_API_KEY = 28f3cae0b33b8b3702120c9ed1a935aa
LOGONSERVER = \\DESKTOP-0NIFP31
PSModulePath = C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
ANDROID_NDK_ROOT = C:\Program Files\Unity\Hub\Editor\6000.0.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK
SystemRoot = C:\Windows
NUMBER_OF_PROCESSORS = 8
WOOTRIC_CLIENT_TOKEN = NPS-aa8be4c3
DEBUG_ENV_VAR = UnityHub
TMP = C:\Users\joest\AppData\Local\Temp
AMPLITUDE_TOKEN_YELLOWBUCKET_PROD = UYDQtPOw83dIfVy3SrW5oMyo7ru4PRkV
FPS_BROWSER_APP_PROFILE_STRING = Internet Explorer
TEMP = C:\Users\joest\AppData\Local\Temp
Path = C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files\TortoiseGit\bin;C:\Users\joest\AppData\Local\Microsoft\WindowsApps;C:\Users\joest\.dotnet\tools;C:\Users\joest\AppData\Local\GitHubDesktop\bin
USERNAME = joest
COMPUTERNAME = DESKTOP-0NIFP31
AMPLITUDE_API_KEY_REDBUCKET_PROD = ca12bb461ea96f9bdf5df4ded7d52994
AMPLITUDE_API_KEY_YELLOWBUCKET_PROD = e03a9bbe92dc38a88cdb068d24c65b46
PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
ALLUSERSPROFILE = C:\ProgramData
SystemDrive = C:
windir = C:\Windows
AMPLITUDE_TOKEN_REDBUCKET_PROD = jTIgKs5KTZOjiqEEVdZFbgo_VRhABduL
FPS_BROWSER_USER_PROFILE_STRING = Default
AMPLITUDE_TOKEN_GREENBUCKET_DEV = 84H2gMm_FJzhr3mBaX1lM1JVukmCM7d9
AMPLITUDE_API_KEY_STAGING = 83ee04fccc67e4fcc7dd527c4c6f1e21
PUBLIC = C:\Users\Public
CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
APPDATA = C:\Users\joest\AppData\Roaming
DriverData = C:\Windows\System32\Drivers\DriverData
PROCESSOR_LEVEL = 6
CommonProgramW6432 = C:\Program Files\Common Files
ProgramFiles(x86) = C:\Program Files (x86)
SESSIONNAME = Console
AMPLITUDE_TOKEN_YELLOWBUCKET_DEV = wKi8foVigDditGFvmZewRFWsEbX9Y0YO
AMPLITUDE_API_KEY_YELLOWBUCKET_DEV = 48835b4d1f5e342aefe5f016324d296a
LOCALAPPDATA = C:\Users\joest\AppData\Local
HOMEPATH = \Users\joest
ProgramData = C:\ProgramData
HOMEDRIVE = C:
USERDOMAIN_ROAMINGPROFILE = DESKTOP-0NIFP31
AMPLITUDE_DEPLOYMENT_KEY_RED_BUCKET_PROD = client-zH8Y7OK1i331EKuG77C6UxN8ygcM6LzS
ORIGINAL_XDG_CURRENT_DESKTOP = undefined
stderr[
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Script 'C:\Users\joest\Desktop\Studio JGL\DekEvolution\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\setupSymbols.gradle' line: 6
* What went wrong:
A problem occurred evaluating script.
> A problem occurred configuring project ':unityLibrary'.
> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
> Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.
If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================
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 --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
]
stdout[
Initialized native services in: C:\Users\joest\.gradle\native
Initialized jansi services in: C:\Users\joest\.gradle\native
Received JVM installation metadata from 'C:\Program Files\Unity\Hub\Editor\6000.0.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK': {JAVA_HOME=C:\Program Files\Unity\Hub\Editor\6000.0.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK, JAVA_VERSION=17.0.9, JAVA_VENDOR=Eclipse Adoptium, RUNTIME_NAME=OpenJDK Runtime Environment, RUNTIME_VERSION=17.0.9+9, VM_NAME=OpenJDK 64-Bit Server VM, VM_VERSION=17.0.9+9, VM_VENDOR=Eclipse Adoptium, OS_ARCH=amd64}
The client will now receive all logging from the daemon (pid: 18484). The daemon log file: C:\Users\joest\.gradle\daemon\8.4\daemon-18484.out.log
Starting 4th build in daemon [uptime: 25 mins 46.992 secs, performance: 100%, GC rate: 0.00/s, heap usage: 0% of 4 GiB]
Using 8 worker leases.
Now considering [C:\Users\joest\Desktop\Studio JGL\DekEvolution\Library\Bee\Android\Prj\IL2CPP\Gradle] as hierarchies to watch
Watching the file system is configured to be enabled if available
File system watching is active
Invalidating in-memory cache of C:\Users\joest\Desktop\Studio JGL\DekEvolution\Library\Bee\Android\Prj\IL2CPP\Gradle\.gradle\8.4\checksums\md5-checksums.bin
Invalidating in-memory cache of C:\Users\joest\Desktop\Studio JGL\DekEvolution\Library\Bee\Android\Prj\IL2CPP\Gradle\.gradle\8.4\checksums\sha1-checksums.bin
Invalidating in-memory cache of C:\Users\joest\Desktop\Studio JGL\DekEvolution\Library\Bee\Android\Prj\IL2CPP\Gradle\.gradle\8.4\checksums\sha256-checksums.bin
Invalidating in-memory cache of C:\Users\joest\Desktop\Studio JGL\DekEvolution\Library\Bee\Android\Prj\IL2CPP\Gradle\.gradle\8.4\checksums\sha512-checksums.bin
Invalidating in-memory cache of C:\Users\joest\Desktop\Studio JGL\DekEvolution\Library\Bee\Android\Prj\IL2CPP\Gradle\.gradle\8.4\fileHashes\fileHashes.bin
Invalidating in-memory cache of C:\Users\joest\Desktop\Studio JGL\DekEvolution\Library\Bee\Android\Prj\IL2CPP\Gradle\.gradle\8.4\fileHashes\resourceHashesCache.bin
Starting Build
Settings evaluated using settings file 'C:\Users\joest\Desktop\Studio JGL\DekEvolution\Library\Bee\Android\Prj\IL2CPP\Gradle\settings.gradle'.
Invalidating in-memory cache of C:\Users\joest\Desktop\Studio JGL\DekEvolution\Library\Bee\Android\Prj\IL2CPP\Gradle\.gradle\8.4\dependencies-accessors\executionHistory.bin
Projects loaded. Root project using build file 'C:\Users\joest\Desktop\Studio JGL\DekEvolution\Library\Bee\Android\Prj\IL2CPP\Gradle\build.gradle'.
Included projects: [root project 'Gradle', project ':launcher', project ':unityLibrary', project ':unityLibrary:GooglePlayGamesManifest.androidlib']
> Configure project :
Evaluating root project 'Gradle' using build file 'C:\Users\joest\Desktop\Studio JGL\DekEvolution\Library\Bee\Android\Prj\IL2CPP\Gradle\build.gradle'.
Invalidating in-memory cache of C:\Users\joest\Desktop\Studio JGL\DekEvolution\Library\Bee\Android\Prj\IL2CPP\Gradle\.gradle\buildOutputCleanup\outputFiles.bin
> Configure project :unityLibrary
Evaluating project ':unityLibrary' using build file 'C:\Users\joest\Desktop\Studio JGL\DekEvolution\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\build.gradle'.
Compiling build file 'C:\Users\joest\Desktop\Studio JGL\DekEvolution\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\build.gradle' using SubsetScriptTransformer.
Compiling build file 'C:\Users\joest\Desktop\Studio JGL\DekEvolution\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\build.gradle' using BuildScriptTransformer.
Using default execution profile
> Configure project :launcher
Evaluating project ':launcher' using build file 'C:\Users\joest\Desktop\Studio JGL\DekEvolution\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\build.gradle'.
Compiling build file 'C:\Users\joest\Desktop\Studio JGL\DekEvolution\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\build.gradle' using SubsetScriptTransformer.
Compiling build file 'C:\Users\joest\Desktop\Studio JGL\DekEvolution\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\build.gradle' using BuildScriptTransformer.
Using default execution profile
Watched directory hierarchies: []
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <f98e4eb1995f4069a90e68a364109383>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <f98e4eb1995f4069a90e68a364109383>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg, System.Text.Encoding inputEncoding) (at <f98e4eb1995f4069a90e68a364109383>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <f98e4eb1995f4069a90e68a364109383>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.String[] extraArguments, System.Action`1[T] progress) (at <f98e4eb1995f4069a90e68a364109383>: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.String[] extraArguments, System.Action`1[T] progress) (at <f98e4eb1995f4069a90e68a364109383>:0)
UnityEditor.Android.PostProcessor.Tasks.TasksCommon.RunLauncherGradleTask (UnityEditor.Android.PostProcessor.PostProcessorContext context, System.String taskName, System.String[] extraArguments, UnityEditor.Android.PostProcessor.IPostProcessorTask owner, UnityEditor.Android.PostProcessor.ProgressHandler progress) (at <f98e4eb1995f4069a90e68a364109383>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <f98e4eb1995f4069a90e68a364109383>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <f98e4eb1995f4069a90e68a364109383>:0)
UnityEditor.GenericMenu:CatchMenu(Object, String[], Int32)