Hello
I’m trying to build my android app and it keeps giving me this error
I have no idea why it happens
PLEASE HELPPPPP
SOMEONE FROM UNITY PLEASSSSE
CommandInvokationFailure: Gradle build failed.
C:\Program Files\Unity\Hub\Editor\6000.0.24f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\6000.0.24f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-8.4.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
Environment Variables:
AMPLITUDE_API_KEY_REDBUCKET_DEV = 46b8b46515e7632fc42a504b72e05fd0
ProgramFiles = C:\Program Files
TMP = C:\Users\Home\AppData\Local\Temp
OneDrive = C:\Users\Home\OneDrive
PROCESSOR_ARCHITECTURE = AMD64
AMPLITUDE_API_KEY_GREENBUCKET_DEV = 3ded2a762163603391a425f688f990c8
OS = Windows_NT
CHROME_CRASHPAD_PIPE_NAME = \\.\pipe\crashpad_13316_FAWWVTTYPZJPXAJP
PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 151 Stepping 2, GenuineIntel
AMPLITUDE_TOKEN_REDBUCKET_DEV = U4PSN7S7PuYVRODivvdcFwbu8R6IHGqa
PROCESSOR_REVISION = 9702
ProgramW6432 = C:\Program Files
CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
AMPLITUDE_API_KEY_GREENBUCKET_PROD = c86fea37a9e1d3f0878b96e15b111c7c
CommonProgramFiles = C:\Program Files\Common Files
DriverData = C:\Windows\System32\Drivers\DriverData
SENTRY_ACCESS_TOKEN = 3df78d9e53f8456aa90fbae044ce1a6261421ab1d0014674bc2e933477289017
JAVA_HOME = C:\Program Files\Unity\Hub\Editor\6000.0.24f1\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 = \\BEAST
USERDOMAIN = BEAST
ANDROID_NDK_ROOT = C:\Program Files\Unity\Hub\Editor\6000.0.24f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK
SystemRoot = C:\Windows
IGCCSVC_DB = AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAx6gLiLaZckuQp/jWqXNi9AQAAAACAAAAAAAQZgAAAAEAACAAAAAkAJMqGkjDVCHdnv9z8ZtfdthDIpo0fYCzHkiAZx1YqgAAAAAOgAAAAAIAACAAAAC8JI9rf7lQxOM+qgJUwpv9dELuwp7QBu2VqKjIw2Oy8WAAAAAZ0xSnhlJdSRw/zQVTqin/IIcfM/erBvFBJ/fwfVWKcUNAH/8hBkbVK53Z/Ioc3q4NJcBWoocVFYiCcGPrj1oClS++aPRMq8stLu0hdQv3i6a3UsYmg602En68iCqse1dAAAAA2Do9df4IuBsAySpXCUbZZdPrBlHmnVTM4Zj9bJJBd9qC9DW+/L6seCYR3qjbfEALzfgkorxuaQjPv8ni3P+5oA==
EFC_7272 = 1
AMPLITUDE_API_KEY_STAGING = 83ee04fccc67e4fcc7dd527c4c6f1e21
WOOTRIC_CLIENT_TOKEN = NPS-aa8be4c3
DEBUG_ENV_VAR = UnityHub
PSModulePath = C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
AMPLITUDE_TOKEN_YELLOWBUCKET_PROD = UYDQtPOw83dIfVy3SrW5oMyo7ru4PRkV
TEMP = C:\Users\Home\AppData\Local\Temp
Path = C:\Program Files (x86)\Common Files\Oracle\Java\java8path;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 (x86)\dotnet\;C:\Program Files\dotnet\;C:\Program Files\WireSock VPN Client\bin\;C:\Users\Home\AppData\Local\Microsoft\WindowsApps;C:\Users\Home\.dotnet\tools
USERNAME = Home
COMPUTERNAME = BEAST
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
SESSIONNAME = Console
AMPLITUDE_TOKEN_GREENBUCKET_DEV = 84H2gMm_FJzhr3mBaX1lM1JVukmCM7d9
ZES_ENABLE_SYSMAN = 1
PUBLIC = C:\Users\Public
DokanLibrary1 = C:\Program Files\Dokan\DokanLibrary-1.5.1\
APPDATA = C:\Users\Home\AppData\Roaming
ORIGINAL_XDG_CURRENT_DESKTOP = undefined
PROCESSOR_LEVEL = 6
CommonProgramW6432 = C:\Program Files\Common Files
ProgramFiles(x86) = C:\Program Files (x86)
USERPROFILE = C:\Users\Home
AMPLITUDE_TOKEN_YELLOWBUCKET_DEV = wKi8foVigDditGFvmZewRFWsEbX9Y0YO
AMPLITUDE_API_KEY_YELLOWBUCKET_DEV = 48835b4d1f5e342aefe5f016324d296a
LOCALAPPDATA = C:\Users\Home\AppData\Local
HOMEPATH = \Users\Home
ProgramData = C:\ProgramData
HOMEDRIVE = C:
USERDOMAIN_ROAMINGPROFILE = BEAST
AMPLITUDE_DEPLOYMENT_KEY_RED_BUCKET_PROD = client-zH8Y7OK1i331EKuG77C6UxN8ygcM6LzS
NUMBER_OF_PROCESSORS = 16
stderr[
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\Home\Desktop\Projects\Test1.2.1 - Copy\Library\Bee\Android\Prj\IL2CPP\Gradle\build.gradle' line: 6
* What went wrong:
Plugin [id: 'com.android.application', version: '8.3.0', apply: false] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'com.android.application:com.android.application.gradle.plugin:8.3.0')
Searched in the following repositories:
Gradle Central Plugin Repository
Google
MavenRepo
* 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[
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d611483178674e829867c052cf677852>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d611483178674e829867c052cf677852>: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 <d611483178674e829867c052cf677852>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <d611483178674e829867c052cf677852>: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 <d611483178674e829867c052cf677852>: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 <d611483178674e829867c052cf677852>:0)
UnityEditor.Android.PostProcessor.Tasks.TasksCommon.RunGradleTask (UnityEditor.Android.PostProcessor.PostProcessorContext context, System.String workingDirectory, System.String taskName, System.String[] extraArguments, UnityEditor.Android.PostProcessor.IPostProcessorTask owner, UnityEditor.Android.PostProcessor.ProgressHandler progress) (at <d611483178674e829867c052cf677852>: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 <d611483178674e829867c052cf677852>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d611483178674e829867c052cf677852>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d611483178674e829867c052cf677852>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Try recreating your custom gradle templates.
Also, is there a chance that your firewall blocks connection to Google servers? Or you’re trying to build without internet connection at all?
Hello and thank you for responding
Idk how or what custom gradle templates are unfortunately.
And I must mention that where I live at the moment, I need to connect to a VPN to be able to reach unity servers, so the option of being offline could be because of that even though I’m always connected to the internet.
And another thing is that I made a copy of the project folder and used that as my project so I could change it and have one unchanged version as well, but now I see that in unity cloud these projects are not signed and they are only in my unity hub
I thought it’s best to point out these things to maybe help the process
Appreciate your help in advance
It’s not Hub or Unity cloud’s fault. These dependencies are downloaded from Google servers during gradle build
Well can I reinstall gradle and reset the dependencies?
What should I do I don’t know
It’s all about your network connection (at least I guess so). Make sure, that during build you can access https://mvnrepository.com/
Right now I can access it and I tried again and still the gradle build fail
I also tested with the 2022 version as well
also this:
CommandInvokationFailure: Gradle build failed.
C:\Program Files\Unity\Hub\Editor\2022.3.41f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath “C:\Program Files\Unity\Hub\Editor\2022.3.41f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-7.5.1.jar” org.gradle.launcher.GradleMain “-Dorg.gradle.jvmargs=-Xmx4096m” “assembleRelease”
Environment Variables:
PROCESSOR_ARCHITECTURE = AMD64
AMPLITUDE_API_KEY_YELLOWBUCKET_DEV = 48835b4d1f5e342aefe5f016324d296a
DokanLibrary1 = C:\Program Files\Dokan\DokanLibrary-1.5.1
ANDROID_NDK_ROOT = C:\Program Files\Unity\Hub\Editor\2022.3.41f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK
DriverData = C:\Windows\System32\Drivers\DriverData
USERDOMAIN = BEAST
CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
COMPUTERNAME = BEAST
DEBUG_ENV_VAR = UnityHub
LOGONSERVER = \BEAST
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
EFC_7504 = 1
OS = Windows_NT
PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 151 Stepping 2, GenuineIntel
HOMEPATH = \Users\Home
FPS_BROWSER_USER_PROFILE_STRING = Default
AMPLITUDE_TOKEN_REDBUCKET_DEV = U4PSN7S7PuYVRODivvdcFwbu8R6IHGqa
CHROME_CRASHPAD_PIPE_NAME = \.\pipe\crashpad_13240_IJIFKAPVOZMJXEOG
PROCESSOR_LEVEL = 6
CommonProgramFiles = C:\Program Files\Common Files
ZES_ENABLE_SYSMAN = 1
JAVA_HOME = C:\Program Files\Unity\Hub\Editor\2022.3.41f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK
USERDOMAIN_ROAMINGPROFILE = BEAST
TEMP = C:\Users\Home\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
USERNAME = Home
OneDrive = C:\Users\Home\OneDrive
AMPLITUDE_API_KEY_YELLOWBUCKET_PROD = e03a9bbe92dc38a88cdb068d24c65b46
IGCCSVC_DB = AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAx6gLiLaZckuQp/jWqXNi9AQAAAACAAAAAAAQZgAAAAEAACAAAAAkAJMqGkjDVCHdnv9z8ZtfdthDIpo0fYCzHkiAZx1YqgAAAAAOgAAAAAIAACAAAAC8JI9rf7lQxOM+qgJUwpv9dELuwp7QBu2VqKjIw2Oy8WAAAAAZ0xSnhlJdSRw/zQVTqin/IIcfM/erBvFBJ/fwfVWKcUNAH/8hBkbVK53Z/Ioc3q4NJcBWoocVFYiCcGPrj1oClS++aPRMq8stLu0hdQv3i6a3UsYmg602En68iCqse1dAAAAA2Do9df4IuBsAySpXCUbZZdPrBlHmnVTM4Zj9bJJBd9qC9DW+/L6seCYR3qjbfEALzfgkorxuaQjPv8ni3P+5oA==
PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
AMPLITUDE_TOKEN_REDBUCKET_PROD = jTIgKs5KTZOjiqEEVdZFbgo_VRhABduL
NUMBER_OF_PROCESSORS = 16
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 = 9702
AMPLITUDE_DEPLOYMENT_KEY_RED_BUCKET_PROD = client-zH8Y7OK1i331EKuG77C6UxN8ygcM6LzS
TMP = C:\Users\Home\AppData\Local\Temp
SystemDrive = C:
AMPLITUDE_API_KEY = 28f3cae0b33b8b3702120c9ed1a935aa
FPS_BROWSER_APP_PROFILE_STRING = Internet Explorer
SENTRY_ACCESS_TOKEN = 3df78d9e53f8456aa90fbae044ce1a6261421ab1d0014674bc2e933477289017
APPDATA = C:\Users\Home\AppData\Roaming
Path = C:\Program Files (x86)\Common Files\Oracle\Java\java8path;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 (x86)\dotnet;C:\Program Files\dotnet;C:\Program Files\WireSock VPN Client\bin;C:\Users\Home\AppData\Local\Microsoft\WindowsApps;C:\Users\Home.dotnet\tools
PSModulePath = C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
LOCALAPPDATA = C:\Users\Home\AppData\Local
USERPROFILE = C:\Users\Home
WOOTRIC_CLIENT_TOKEN = NPS-aa8be4c3
stderr[
FAILURE: Build failed with an exception.
-
Where:
Build file ‘C:\Users\Home\Desktop\Projects\Test1.2\Library\Bee\Android\Prj\Mono2x\Gradle\build.gradle’ line: 6
-
What went wrong:
Plugin [id: ‘com.android.application’, version: ‘7.4.2’, apply: false] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in ‘org.gradle’ namespace)
- Plugin Repositories (could not resolve plugin artifact ‘com.android.application:com.android.application.gradle.plugin:7.4.2’)
Searched in the following repositories:
Gradle Central Plugin Repository
Google
MavenRepo
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.
BUILD FAILED in 19s
]
stdout[
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <9cedf0d52e2b458485a933e93180d3da>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <9cedf0d52e2b458485a933e93180d3da>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <9cedf0d52e2b458485a933e93180d3da>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action1[T] progress, System.String error) (at <9cedf0d52e2b458485a933e93180d3da>: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 <9cedf0d52e2b458485a933e93180d3da>: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 <9cedf0d52e2b458485a933e93180d3da>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <9cedf0d52e2b458485a933e93180d3da>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <9cedf0d52e2b458485a933e93180d3da>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
You’ll probably face the same with every single version, even the same you’ve used to successfully build before. It is network related issue, so try solving that.