Unity Mobile: Failed to update Android SDK package list

Hi

I’m watching Unity Mobile Course, and I downloaded LTS Unity 2022.3.4f1.

And when i tried to build i see this problem:

CommandInvokationFailure: Failed to update Android SDK package list.
D:\UnityHubInstalls\2022.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\cmdline-tools\6.0\bin\sdkmanager.bat --list

I tried a lot of solutions on internet, still the problem same.
I tried these solutions:

  1. Reinstall the LTS Unity with android module.
  2. Try to update SDK from SDK manager of android studio.
  3. other small solutions such as restart the pc or Unity or check and uncheck SDK from Prefrences.

what is the problem? and how to fix it???
I will write the hole error message and hope anyone help me.

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&)

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&)
CommandInvokationFailure: Failed to update Android SDK package list.
D:\UnityHubInstalls\2022.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\cmdline-tools\6.0\bin\sdkmanager.bat --list
Environment Variables:
USERDOMAIN = DESKTOP-ECM4IET
ProgramFiles = C:\Program Files
TMP = C:\Users\ALWALE~1\AppData\Local\Temp
PROCESSOR_ARCHITECTURE = AMD64
PROCESSOR_REVISION = 4501
OS = Windows_NT
CHROME_CRASHPAD_PIPE_NAME = \.\pipe\crashpad_11088_HCBRSXZGNPZHKGRW
PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 69 Stepping 1, GenuineIntel
AMPLITUDE_API_KEY = 28f3cae0b33b8b3702120c9ed1a935aa
USERPROFILE = C:\Users\alwaleed center
JAVA_HOME = D:\UnityHubInstalls\2022.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK
CommonProgramFiles = C:\Program Files\Common Files
DriverData = C:\Windows\System32\Drivers\DriverData
ComSpec = C:\Windows\system32\cmd.exe
LAUNCH_DARKLY_CLIENT_TOKEN = 60a7e30fafc7e60e33446283
PSModulePath = C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC = C:\Users\Public
SystemRoot = C:\Windows
HEAP_CLIENT_TOKEN = 1717415662
NUMBER_OF_PROCESSORS = 4
WOOTRIC_CLIENT_TOKEN = NPS-aa8be4c3
JAVA_TOOL_OPTIONS = -Dfile.encoding=UTF-8
DEBUG_ENV_VAR = UnityHub
ProgramW6432 = C:\Program Files
TEMP = C:\Users\ALWALE~1\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:\xampp\php;C:\ProgramData\ComposerSetup\bin;C:\Program Files\nodejs;C:\Program Files\dotnet;C:\Program Files\PuTTY;C:\Users\alwaleed center\AppData\Local\Microsoft\WindowsApps;C:\Users\alwaleed center\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\alwaleed center\AppData\Roaming\Composer\vendor\bin;C:\Users\alwaleed center\AppData\Roaming\npm;C:\Users\alwaleed center.dotnet\tools;
USERNAME = alwaleed center
COMPUTERNAME = DESKTOP-ECM4IET
USERDOMAIN_ROAMINGPROFILE = DESKTOP-ECM4IET
PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
SystemDrive = C:
ALLUSERSPROFILE = C:\ProgramData
SENTRY_ACCESS_TOKEN = 3df78d9e53f8456aa90fbae044ce1a6261421ab1d0014674bc2e933477289017
HEAP_CLIENT_TOKEN_STAGING = 3786794399
windir = C:\Windows
AMPLITUDE_API_KEY_STAGING = 83ee04fccc67e4fcc7dd527c4c6f1e21
CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
APPDATA = C:\Users\alwaleed center\AppData\Roaming
PROCESSOR_LEVEL = 6
CommonProgramW6432 = C:\Program Files\Common Files
ProgramFiles(x86) = C:\Program Files (x86)
SESSIONNAME = Console
LOGONSERVER = \DESKTOP-ECM4IET
LOCALAPPDATA = C:\Users\alwaleed center\AppData\Local
HOMEPATH = \Users\alwaleed center
LAUNCH_DARKLY_CLIENT_TOKEN_STAGING = 60a7e30fafc7e60e33446282
HOMEDRIVE = C:
OneDrive = C:\Users\alwaleed center\OneDrive
ProgramData = C:\ProgramData
ORIGINAL_XDG_CURRENT_DESKTOP = undefined
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 :0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0)
UnityEditor.Android.AndroidSDKTools.RunAndroidSdkTool (System.String toolName, System.String arguments, System.Boolean updateCommand, System.String errorMsg, System.String toolsDir, System.String warningsToIgnore) (at :0)
UnityEditor.Android.AndroidSDKTools.ListComponentsVersions () (at :0)
UnityEditor.Android.SDKManager.UpdatePackagesList () (at :0)
UnityEditor.Android.SDKManager.HighestVersionInstalled (UnityEditor.Android.SDKManager+Component tool) (at :0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKToolsDetector.GetVersion () (at :0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKComponentDetector.Detect (System.Version minVersion, UnityEditor.Android.PostProcessor.ProgressHandler onProgress) (at :0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK.EnsureSDKComponentVersion (System.Version minVersion, UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKComponentDetector detector) (at :0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Maybe it’s Android studio error failed to download sources?? what should i do???

We really shouldn’t be dealing with Android Studio at all here. Unity should be providing the SDK and JDK tools. Unfortunately, there are a myriad of reasons for this. Here are some helpful links. Although the versions are different, the various causes and solutions hold up from version to version. Most often, it is having another version of the Java tools installed with the path directory pointing to it, but your path directory appears correct. It can often be caused by 3rd party tools such as Firebase, or wrong versions of some plugins.

https://forum.unity.com/threads/fixed-failed-to-update-android-sdk-package-list.884191/
https://forum.unity.com/threads/failed-to-update-android-sdk-package-list-error-when-using-sdk-installed-with-unity.722777/
https://forum.unity.com/threads/failed-to-update-android-sdk-package-list.1403356/
https://forum.unity.com/threads/failed-to-update-android-sdk-package-list-player-settings-error.731336/

Thanks a lot…
I solved the problem.I downloaded an older version of Unity LTS. it’s Unity 2021.3.27f1 LTS.

Maybe the problem in Unity 2022.3.1f1 and 2022.3.4f1 itself right??

I believe the problem is in the LTS version of Unity 2022.3

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms