I started to use Unity 6000.0.28f1 and everything was good until i faced an error while building to android (i’m listing the error below)
note that i downloaded the android build manually using unity website
so at first i got this error "JDK directory is not set or invalid"
so i downloaded jdk 17 as it said in the error message and located it in unity using external tools tab and tried to build again and i got these errors
Configure project :unityLibrary
Variant ‘debug’, will keep symbols in binaries for:
‘libunity.so’
‘libil2cpp.so’
‘libmain.so’
Variant ‘release’, symbols will be stripped from binaries.
Configure project :launcher
Variant ‘debug’, will keep symbols in binaries for:
‘libunity.so’
‘libil2cpp.so’
‘libmain.so’
Variant ‘release’, symbols will be stripped from binaries.
WARNING: The specified Android SDK Build Tools version (32.0.0) is ignored, as it is below the minimum supported version (34.0.0) for Android Gradle Plugin 8.3.0.
Android SDK Build Tools 34.0.0 will be used.
To suppress this warning, remove “buildToolsVersion ‘32.0.0’” from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
WARNING: The specified Android SDK Build Tools version (32.0.0) is ignored, as it is below the minimum supported version (34.0.0) for Android Gradle Plugin 8.3.0.
Android SDK Build Tools 34.0.0 will be used.
To suppress this warning, remove “buildToolsVersion ‘32.0.0’” from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\32.0.0\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-31\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\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\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\32.0.0\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-31\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\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\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\32.0.0\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-31\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\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\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
Errors during XML parse:
Additionally, the fallback loader failed to parse the XML.
Checking the license for package Android SDK Build-Tools 34 in C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\licenses
Warning: License for package Android SDK Build-Tools 34 not accepted.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
error 2
FAILURE: Build failed with an exception.
- What went wrong:
Could not determine the dependencies of task ‘:launcher:lintVitalReportRelease’.
Failed to install the following Android SDK packages as some licences have not been accepted.
build-tools;34.0.0 Android SDK Build-Tools 34
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
All licenses can be accepted using the sdkmanager command line tool:
sdkmanager --licenses
Or, to transfer the license agreements from one workstation to another, see Actualiza el IDE y las herramientas del SDK | Android Studio | Android Developers
Using Android SDK: C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK
- 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 1m 12s
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
error 3
CommandInvokationFailure: Gradle build failed.
C:\Program Files\Java\jdk-17\bin\java.exe -classpath “C:\Program Files\Unity\Hub\Editor\6000.0.28f1\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
USERDOMAIN = DRAGON
ProgramFiles = C:\Program Files
USERPROFILE = C:\Users\elshamey
OneDrive = C:\Users\elshamey\OneDrive
PROCESSOR_ARCHITECTURE = AMD64
AMPLITUDE_API_KEY_GREENBUCKET_DEV = 3ded2a762163603391a425f688f990c8
OS = Windows_NT
CHROME_CRASHPAD_PIPE_NAME = \.\pipe\crashpad_10160_ZXRTQAOWNRYZAFAU
PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
AMPLITUDE_TOKEN_REDBUCKET_DEV = U4PSN7S7PuYVRODivvdcFwbu8R6IHGqa
PROCESSOR_REVISION = 3c03
ProgramW6432 = C:\Program 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\Java\jdk-17
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 = \DRAGON
PSModulePath = C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
ANDROID_NDK_ROOT = C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK
SystemRoot = C:\WINDOWS
NUMBER_OF_PROCESSORS = 4
WOOTRIC_CLIENT_TOKEN = NPS-aa8be4c3
DEBUG_ENV_VAR = UnityHub
TMP = C:\Users\elshamey\AppData\Local\Temp
AMPLITUDE_TOKEN_YELLOWBUCKET_PROD = UYDQtPOw83dIfVy3SrW5oMyo7ru4PRkV
FPS_BROWSER_APP_PROFILE_STRING = Internet Explorer
TEMP = C:\Users\elshamey\AppData\Local\Temp
Path = C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\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\dotnet;C:\Users\elshamey\AppData\Local\Microsoft\WindowsApps;C:\Users\elshamey.dotnet\tools;C:\Users\elshamey\AppData\Local\Muse Hub\lib;C:\Users\elshamey\AppData\Local\Programs\Microsoft VS Code\bin
USERNAME = elshamey
COMPUTERNAME = DRAGON
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\elshamey\AppData\Roaming
DXSDK_DIR = C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)
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\elshamey\AppData\Local
VBOX_HWVIRTEX_IGNORE_SVM_IN_USE = 1
HOMEPATH = \Users\elshamey
ProgramData = C:\ProgramData
HOMEDRIVE = C:
USERDOMAIN_ROAMINGPROFILE = DRAGON
AMPLITUDE_DEPLOYMENT_KEY_RED_BUCKET_PROD = client-zH8Y7OK1i331EKuG77C6UxN8ygcM6LzS
ORIGINAL_XDG_CURRENT_DESKTOP = undefined
stderr[
FAILURE: Build failed with an exception.
- What went wrong:
Could not determine the dependencies of task ‘:launcher:lintVitalReportRelease’.
Failed to install the following Android SDK packages as some licences have not been accepted.
build-tools;34.0.0 Android SDK Build-Tools 34
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
All licenses can be accepted using the sdkmanager command line tool:
sdkmanager --licenses
Or, to transfer the license agreements from one workstation to another, see Actualiza el IDE y las herramientas del SDK | Android Studio | Android Developers
Using Android SDK: C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK
- 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 1m 12s
]
stdout[
Configure project :unityLibrary
Variant ‘debug’, will keep symbols in binaries for:
‘libunity.so’
‘libil2cpp.so’
‘libmain.so’
Variant ‘release’, symbols will be stripped from binaries.
Configure project :launcher
Variant ‘debug’, will keep symbols in binaries for:
‘libunity.so’
‘libil2cpp.so’
‘libmain.so’
Variant ‘release’, symbols will be stripped from binaries.
WARNING: The specified Android SDK Build Tools version (32.0.0) is ignored, as it is below the minimum supported version (34.0.0) for Android Gradle Plugin 8.3.0.
Android SDK Build Tools 34.0.0 will be used.
To suppress this warning, remove “buildToolsVersion ‘32.0.0’” from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
WARNING: The specified Android SDK Build Tools version (32.0.0) is ignored, as it is below the minimum supported version (34.0.0) for Android Gradle Plugin 8.3.0.
Android SDK Build Tools 34.0.0 will be used.
To suppress this warning, remove “buildToolsVersion ‘32.0.0’” from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\32.0.0\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-31\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\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\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\32.0.0\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-31\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\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\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\32.0.0\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-31\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\6000.0.28f1\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\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
Errors during XML parse:
Additionally, the fallback loader failed to parse the XML.
Checking the license for package Android SDK Build-Tools 34 in C:\Program Files\Unity\Hub\Editor\6000.0.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\licenses
Warning: License for package Android SDK Build-Tools 34 not accepted.
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <504fc30bb3c84fc7a2f49634e49dcfeb>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <504fc30bb3c84fc7a2f49634e49dcfeb>: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 <504fc30bb3c84fc7a2f49634e49dcfeb>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action1[T] progress, System.String error) (at <504fc30bb3c84fc7a2f49634e49dcfeb>: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 <504fc30bb3c84fc7a2f49634e49dcfeb>: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 <504fc30bb3c84fc7a2f49634e49dcfeb>: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 <504fc30bb3c84fc7a2f49634e49dcfeb>: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 <504fc30bb3c84fc7a2f49634e49dcfeb>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <504fc30bb3c84fc7a2f49634e49dcfeb>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <504fc30bb3c84fc7a2f49634e49dcfeb>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)