when i build to android i got this error and i try fixed from edit >preferences didn’t work on every unity editor.
How to troubleshoot build failures:
Obviously, if there is actionable data within the errors, fix those problems. Each error entry may have more information than can fit in the console log so select each error and read the expanded view below it.
If that gives you nothing worthwhile (look to Google! You’re never the first one!), then…
First, make a blank project with a single blank scene and prove that it builds successfully.
If the blank project does NOT build, go fix your Unity installation or your other tools, such as Android SDK, NDK, JDK, etc. It may even be necessary to change to a different version of Unity3D. It is generally best to stay with LTS versions of Unity3D.
Until you can build a blank project to the target platform, don’t fiddle with anything else.
Once you can build a blank project, now bisect the problem by bringing over parts of your current project and building it one subsystem at a time, perhaps stubbing things out that might trigger compiler errors.
Most often things that prevent building are third-party libraries such as Firebase.
Once you identify the subsystem, go to the documentation for it and make sure you are doing it correctly.
It may also be helpful to work through a tutorial or two for whatever subsystem is making the build fail.
Android build not building:
Recently (circa July 2022) there have been reports of Unity’s installer failing to install the Android Tools.
Here was how I brought up Unity2020.3.41 and the Android SDK 31 on October 30, 2022 (edited on August 23, 2023 to include Android SDK 33…):
Android Gradle errors and other related stuff:
i did troubleshoot build failures and i got build errors and i try fixed but didn’t work
first error of JAVA_TOOL_OPTIONS
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
Warning: Failed to download any source lists!
Exception in thread “main” java.util.UnknownFormatConversionException: Conversion = ‘-’
at java.base/java.util.Formatter.checkText(Formatter.java:2732)
at java.base/java.util.Formatter.parse(Formatter.java:2718)
at java.base/java.util.Formatter.format(Formatter.java:2655)
at java.base/java.io.PrintStream.format(PrintStream.java:1053)
at java.base/java.io.PrintStream.printf(PrintStream.java:949)
at com.android.sdklib.tool.sdkmanager.TableFormatter.print(TableFormatter.java:72)
at com.android.sdklib.tool.sdkmanager.ListAction.printList(ListAction.java:197)
at com.android.sdklib.tool.sdkmanager.ListAction.execute(ListAction.java:80)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.run(SdkManagerCli.java:110)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:87)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:49)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Second Error of Failed to update Android SDK
CommandInvokationFailure: Failed to update Android SDK package list.
C:\Program Files\Unity\Hub\Editor\2022.3.17f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\cmdline-tools\6.0\bin\sdkmanager.bat --list
Environment Variables:
SHIM_MCCOMPAT = 0x810000001
PROCESSOR_ARCHITECTURE = AMD64
JAVA_HOME = C:\Program Files\Unity\Hub\Editor\2022.3.17f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK
AMPLITUDE_API_KEY_GREENBUCKET_PROD = c86fea37a9e1d3f0878b96e15b111c7c
DriverData = C:\Windows\System32\Drivers\DriverData
USERDOMAIN = MSI
CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
COMPUTERNAME = MSI
DEBUG_ENV_VAR = UnityHub
LOGONSERVER = \MSI
AMPLITUDE_TOKEN_GREENBUCKET_PROD = yyzPzalJDwrQcYNuOZam0bhKb26WyyhK
AMPLITUDE_API_KEY_YELLOWBUCKET_DEV = 48835b4d1f5e342aefe5f016324d296a
ProgramData = C:\ProgramData
SESSIONNAME = Console
AMPLITUDE_TOKEN_YELLOWBUCKET_PROD = Ph-837Q6GNodAkyc2MRkxVPUcjlIET4d
NVIDIAWHITELISTED = 0x01
APPDATA = C:\Users\kaled\AppData\Roaming
SystemRoot = C:\Windows
windir = C:\Windows
AMPLITUDE_API_KEY_REDBUCKET_DEV = 46b8b46515e7632fc42a504b72e05fd0
ProgramFiles(x86) = C:\Program Files (x86)
configsetroot = C:\Windows\ConfigSetRoot
EFC_8748 = 1
INTEL_DEV_REDIST = C:\Program Files (x86)\Common Files\Intel\Shared Libraries
OS = Windows_NT
PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 154 Stepping 3, GenuineIntel
HEAP_CLIENT_TOKEN_STAGING = 3786794399
HOMEPATH = \Users\kaled
FPS_BROWSER_USER_PROFILE_STRING = Default
AMPLITUDE_TOKEN_REDBUCKET_DEV = U4PSN7S7PuYVRODivvdcFwbu8R6IHGqa
CHROME_CRASHPAD_PIPE_NAME = \.\pipe\crashpad_1984_ETYKNKTNXJQYZZTQ
MIC_LD_LIBRARY_PATH = C:\Program Files (x86)\Common Files\Intel\Shared Libraries\compiler\lib\mic
JAVA_TOOL_OPTIONS = -Dfile.encoding=UTF-8
CommonProgramFiles = C:\Program Files\Common Files
ZES_ENABLE_SYSMAN = 1
PUBLIC = C:\Users\Public
USERDOMAIN_ROAMINGPROFILE = MSI
TEMP = C:\Users\kaled\AppData\Local\Temp
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 = kaled
OneDrive = C:\Users\kaled\OneDrive
AMPLITUDE_API_KEY_YELLOWBUCKET_PROD = e03a9bbe92dc38a88cdb068d24c65b46
IGCCSVC_DB = AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA2RpgWs6IskuJjsyOQ2ZjUQQAAAACAAAAAAAQZgAAAAEAACAAAAD1yKxJIWk+iZDdCT22qVJt9n7Ns9xnQxjFpE48rNZqRwAAAAAOgAAAAAIAACAAAACjOqR08To86SQve12zaRNzIKcQVuf1JePaNEVnokG/Q2AAAADyzzgUyLdYRhJ1kf/6tmtgfbTkMj4s/hX/6Nu03INBBkH7dwbPVTx9i+TTLpBlR5v75T+OEfnP5O86Ou9SEVwUB16GCaWkp58I1tnjSn67RNfvanueCIvEH+5heFw0zkFAAAAATro0oGa/ASCe0UlLzKCgEH1UyrX5Wh8GnM7tsPWdXVONH+22IJZLXpfpnELh7b7fh0TlBtngEaejlL6Q0LlX+g==
PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
AMPLITUDE_TOKEN_REDBUCKET_PROD = QqyoFpcWPi7V17p80_46CF6-sNGRGbHo
__PSLockDownPolicy = 0
OculusBase = C:\Program Files\Oculus
NUMBER_OF_PROCESSORS = 16
AMPLITUDE_TOKEN_GREENBUCKET_DEV = 84H2gMm_FJzhr3mBaX1lM1JVukmCM7d9
AMPLITUDE_DEPLOYMENT_KEY_RED_BUCKET_DEV = client-wbjHYrmeSR87GmWOE7LDpf7sUySOIKHm
PROCESSOR_LEVEL = 6
ProgramW6432 = C:\Program Files
PSModulePath = C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
ComSpec = C:\Windows\system32\cmd.exe
ORIGINAL_XDG_CURRENT_DESKTOP = undefined
PROCESSOR_REVISION = 9a03
AMPLITUDE_DEPLOYMENT_KEY_RED_BUCKET_PROD = client-zH8Y7OK1i331EKuG77C6UxN8ygcM6LzS
TMP = C:\Users\kaled\AppData\Local\Temp
SystemDrive = C:
AMPLITUDE_API_KEY = 28f3cae0b33b8b3702120c9ed1a935aa
FPS_BROWSER_APP_PROFILE_STRING = Internet Explorer
SENTRY_ACCESS_TOKEN = 3df78d9e53f8456aa90fbae044ce1a6261421ab1d0014674bc2e933477289017
HEAP_CLIENT_TOKEN = 1717415662
ALLUSERSPROFILE = C:\ProgramData
Path = C:\Program Files\Oculus\Support\oculus-runtime;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\dotnet;C:\Program Files\Git\cmd;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Users\kaled\AppData\Local\Microsoft\WindowsApps;C:\Users\kaled\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\kaled.dotnet\tools;C:\Users\kaled\AppData\Local\GitHubDesktop\bin
ProgramFiles = C:\Program Files
LOCALAPPDATA = C:\Users\kaled\AppData\Local
USERPROFILE = C:\Users\kaled
WOOTRIC_CLIENT_TOKEN = NPS-aa8be4c3
stderr[
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
Warning: Failed to download any source lists!
Exception in thread “main” java.util.UnknownFormatConversionException: Conversion = ‘-’
at java.base/java.util.Formatter.checkText(Formatter.java:2732)
at java.base/java.util.Formatter.parse(Formatter.java:2718)
at java.base/java.util.Formatter.format(Formatter.java:2655)
at java.base/java.io.PrintStream.format(PrintStream.java:1053)
at java.base/java.io.PrintStream.printf(PrintStream.java:949)
at com.android.sdklib.tool.sdkmanager.TableFormatter.print(TableFormatter.java:72)
at com.android.sdklib.tool.sdkmanager.ListAction.printList(ListAction.java:197)
at com.android.sdklib.tool.sdkmanager.ListAction.execute(ListAction.java:80)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.run(SdkManagerCli.java:110)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:87)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:49)
]
stdout[
Loading package information…
Loading local repository…
[========= ] 25% Loading local repository…
[========= ] 25% Fetch remote repository…
[========== ] 26% Fetch remote repository…
[========== ] 27% Fetch remote repository…
[=========== ] 28% Fetch remote repository…
[=========== ] 29% Fetch remote repository…
[=========== ] 29% Fetch remote repository…
[================ ] 41% Fetch remote repository…
[==================== ] 53% Fetch remote repository…
[========================= ] 64% Fetch remote repository…
[============================= ] 75% Fetch remote repository…
[============================= ] 75% Computing updates…
[=======================================] 100% Computing updates…
Installed packages:
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <6542399aa1cb4f1c8de3e43116fd1b96>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <6542399aa1cb4f1c8de3e43116fd1b96>:0)
UnityEditor.Android.AndroidSDKTools.RunAndroidSdkTool (System.String toolName, System.String arguments, System.Boolean updateCommand, System.String errorMsg, System.String toolsDir, System.String[ ] warningsToIgnore) (at <6542399aa1cb4f1c8de3e43116fd1b96>:0)
UnityEditor.Android.AndroidSDKTools.ListComponentsVersions () (at <6542399aa1cb4f1c8de3e43116fd1b96>:0)
UnityEditor.Android.SDKManager.UpdatePackagesList () (at <6542399aa1cb4f1c8de3e43116fd1b96>:0)
UnityEditor.Android.SDKManager.HighestVersionInstalled (UnityEditor.Android.SDKManager+Component tool) (at <6542399aa1cb4f1c8de3e43116fd1b96>:0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKToolsDetector.GetVersion () (at <6542399aa1cb4f1c8de3e43116fd1b96>:0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKComponentDetector.Detect (System.Version minVersion, UnityEditor.Android.PostProcessor.ProgressHandler onProgress) (at <6542399aa1cb4f1c8de3e43116fd1b96>:0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK.EnsureSDKComponentVersion (System.Version minVersion, UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKComponentDetector detector) (at <6542399aa1cb4f1c8de3e43116fd1b96>:0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <6542399aa1cb4f1c8de3e43116fd1b96>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <6542399aa1cb4f1c8de3e43116fd1b96>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
I try all my projects same problem
always deal with the first issue, not the next… error reading local repository? it seems to be having connectivity issues
Loading package information…
Loading local repository…
[========= ] 25% Loading local repository…
[========= ] 25% Fetch remote repository…
[========== ] 26% Fetch remote repository…
[========== ] 27% Fetch remote repository…
[=========== ] 28% Fetch remote repository…
[=========== ] 29% Fetch remote repository…
[=========== ] 29% Fetch remote repository…
[================ ] 41% Fetch remote repository…
[==================== ] 53% Fetch remote repository…
[========================= ] 64% Fetch remote repository…
[============================= ] 75% Fetch remote repository…
[============================= ] 75% Computing updates…
[=======================================] 100% Computing updates…
Installed packages:
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
i don’t know why error here but my internet it ok
and the rest of that reads what? did it have problems installing it?
do you think is my problem in my unity hub?
no
if you mean unity editor i don’t have problem installing it
no not the editor…
Your error, it was installing some package, you truncated the error… and you always fix the first error next, so
WHAT WAS THE ERROR (and no, i dont personally care YOU need to read the error and try and fix it)
i got error from unity editor 3.7f1 i can’t download android packages but when i use unity editor 3.10f and higher the problem didn’t come now i use 3.17f
MY PROBLEM I CAN’T BUILD ANDROID
look if you dont want to answer questions so people can help you… @Kurt-Dekker gave you some great generic how to sort android advice… Im trying to help you with the fact that there are 4 errors, the first of which is NOT you cant build android its complaining of something else, and your android stuff says “cant download” so… as both are internet sounding … but as you wont give me information so i can help you…
Enjoy your non builds.
i download JAVA but didn’t work and i try change path maybe the space in program file but didn’t work
