Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello.

So when I finished my game in unity, everything worked. But when I tried to build the apk... got this 4 errors;

UnityException: Android SDK not found
Unable to detect SDK in the selected directory. C:\Program Files\Unity\Hub\Editor\2022.3.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\cmdline-tools\latest\bin\sdkmanager.bat does not exist. Android SDK command-line tools component is not found. Make sure "Command-line Tools (latest)" is installed in the SDK manager.
If command-line tools are installed, but this message is still shown, please restart the Unity editor. 
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)


Build completed with a result of 'Failed' in 154 seconds (154263 ms)
UnityException: Android SDK not found
Unable to detect SDK in the selected directory. C:\Program Files\Unity\Hub\Editor\2022.3.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\cmdline-tools\latest\bin\sdkmanager.bat does not exist. Android SDK command-line tools component is not found. Make sure "Command-line Tools (latest)" is installed in the SDK manager.
If command-line tools are installed, but this message is still shown, please restart the Unity editor. 
0x00007ff72faa229d (Unity) StackWalker::GetCurrentCallstack
0x00007ff72faa7249 (Unity) StackWalker::ShowCallstack
0x00007ff730a733a1 (Unity) GetStacktrace
0x00007ff731134c02 (Unity) DebugStringToFile
0x00007ff72e9b8736 (Unity) DebugLogHandler_CUSTOM_Internal_Log
0x000001978cdd77c3 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
0x000001978cdd76db (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
0x000001978cdd7420 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
0x000001982bb050d5 (Mono JIT Code) UnityEngine.Debug:LogError (object)
0x0000019827f881a3 (Mono JIT Code) UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
0x0000019827f82fcb (Mono JIT Code) UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
0x0000019827c24333 (Mono JIT Code) UnityEditor.BuildPlayerWindow:GUIBuildButtons (UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.Build.BuildPlatform,UnityEditor.Modules.IBuildPostprocessor)
0x0000019827c08c1b (Mono JIT Code) UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings ()
0x0000019827bf8dfb (Mono JIT Code) UnityEditor.BuildPlayerWindow:OnGUI ()
0x000001978cc8f592 (Mono JIT Code) UnityEditor.HostView:InvokeOnGUI (UnityEngine.Rect)
0x000001978cc8f373 (Mono JIT Code) UnityEditor.DockArea:DrawView (UnityEngine.Rect)
0x000001978cc7d843 (Mono JIT Code) UnityEditor.DockArea:OldOnGUI ()
0x000001978cc6128f (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool)
0x000001978cc6040b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool)
0x000001978cc5f48b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,System.Action,bool)
0x000001978cc5f2f3 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,bool)
0x000001978cc5ee0b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase,bool,bool)
0x000001978cc5ecc3 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUI (UnityEngine.UIElements.EventBase,bool,bool)
0x00000196ba7de8f3 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:ProcessEvent (UnityEngine.UIElements.EventBase)
0x00000196ba7de4d3 (Mono JIT Code) UnityEngine.UIElements.CallbackEventHandler:HandleEvent (UnityEngine.UIElements.EventBase)
0x00000196ba7de20f (Mono JIT Code) UnityEngine.UIElements.CallbackEventHandler:HandleEventAtCurrentTargetAndPhase (UnityEngine.UIElements.EventBase)
0x00000196ba7ddf93 (Mono JIT Code) UnityEngine.UIElements.CallbackEventHandler:HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase)
0x000001978cc5d88b (Mono JIT Code) UnityEngine.UIElements.MouseCaptureDispatchingStrategy:DispatchEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x000001978bac593e (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,bool)
0x000001978bac520b (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x00000196ba7c9813 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEventQueue ()
0x00000196ba7c9683 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:OpenGate ()
0x00000196ba7c95db (Mono JIT Code) UnityEngine.UIElements.EventDispatcherGate:Dispose ()
0x000001978bac56e3 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x000001978babfad3 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:Dispatch (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,UnityEngine.UIElements.DispatchMode)
0x000001978babf92b (Mono JIT Code) UnityEngine.UIElements.BaseVisualElementPanel:SendEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.DispatchMode)
0x000001978cc41593 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel)
0x000001978cc40e83 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&)
0x000001978cc40c3f (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration:ProcessEvent (int,intptr)
0x000001978cc40b5b (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr)
0x000001978cc409ad (Mono JIT Code) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
0x000001978cc40a66 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr)
0x00007ffd9cece0d4 (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ffd9ce0eb74 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3066)
0x00007ffd9ce0ed0c (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3113)
0x00007ff72f9b9724 (Unity) scripting_method_invoke
0x00007ff72f997944 (Unity) ScriptingInvocation::Invoke
0x00007ff72f992595 (Unity) ScriptingInvocation::Invoke<void>
0x00007ff72faecaca (Unity) Scripting::UnityEngine::GUIUtilityProxy::ProcessEvent
0x00007ff7304debf8 (Unity) GUIView::ProcessRetainedMode
0x00007ff730aa635e (Unity) GUIView::OnInputEvent
0x00007ff7304deb43 (Unity) GUIView::ProcessInputEventFromAPI
0x00007ff7304dea18 (Unity) GUIView::ProcessInputEvent
0x00007ff730aa718e (Unity) GUIView::ProcessEventMessages
0x00007ff730aa0f15 (Unity) GUIView::GUIViewWndProc
0x00007ffe06f6e858 (USER32) CallWindowProcW
0x00007ffe06f6e299 (USER32) DispatchMessageW
0x00007ff730a79b63 (Unity) MainMessageLoop
0x00007ff730a7f540 (Unity) WinMain
0x00007ff731e68bae (Unity) __scrt_common_main_seh


ArgumentNullException: Value cannot be null.
Parameter name: key
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <b89873cb176e44a995a4781c7487d410>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <b89873cb176e44a995a4781c7487d410>:0)
System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement] (TSource[] source, System.Func`2[T,TResult] keySelector, System.Func`2[T,TResult] elementSelector, System.Collections.Generic.IEqualityComparer`1[T] comparer) (at <f3cb625e9a3f437991ebaf58a99c81f7>:0)
System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Func`2[T,TResult] elementSelector, System.Collections.Generic.IEqualityComparer`1[T] comparer) (at <f3cb625e9a3f437991ebaf58a99c81f7>:0)
System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Func`2[T,TResult] elementSelector) (at <f3cb625e9a3f437991ebaf58a99c81f7>:0)
UnityEditor.PackageManager.UI.Internal.PageSelection.SetNewSelection (System.Collections.Generic.IEnumerable`1[T] packageAndVersionIds) (at <97436df440ca462884c5332c1d8ebbe7>:0)
UnityEditor.PackageManager.UI.Internal.BasePage.SetNewSelection (System.Collections.Generic.IEnumerable`1[T] packageAndVersionIds) (at <97436df440ca462884c5332c1d8ebbe7>:0)
UnityEditor.PackageManager.UI.Internal.PageManager.SetSelected (System.Collections.Generic.IEnumerable`1[T] newSelection, System.Boolean forceSelectInInspector) (at <97436df440ca462884c5332c1d8ebbe7>:0)
UnityEditor.PackageManager.UI.Internal.PageManager.SetSelected (UnityEditor.PackageManager.UI.Internal.IPackage package, UnityEditor.PackageManager.UI.Internal.IPackageVersion version, System.Boolean forceSelectInInspector) (at <97436df440ca462884c5332c1d8ebbe7>:0)
UnityEditor.PackageManager.UI.Internal.PackageManagerWindowRoot.SelectPackageAndFilter () (at <97436df440ca462884c5332c1d8ebbe7>:0)
UnityEditor.PackageManager.UI.Internal.PackageManagerWindowRoot.SelectPackageAndFilter (System.String packageToSelect, System.Nullable`1[T] filterTab, System.Boolean refresh, System.String searchText) (at <97436df440ca462884c5332c1d8ebbe7>:0)
UnityEditor.PackageManager.UI.PackageManagerWindow.SelectPackageAndFilterStatic (System.String packageToSelect, System.Nullable`1[T] filterTab, System.Boolean refresh, System.String searchText) (at <97436df440ca462884c5332c1d8ebbe7>:0)
UnityEditor.PackageManager.UI.PackageManagerWindow.OpenPackageManager (System.String packageToSelect) (at <97436df440ca462884c5332c1d8ebbe7>:0)
UnityEditor.PackageManager.UI.Window.Open (System.String packageToSelect) (at <97436df440ca462884c5332c1d8ebbe7>:0)
UnityEditor.AdaptivePerformance.Editor.AdaptivePerformanceGeneralBuildProcessor.CheckInstalledPackages () (at ./Library/PackageCache/com.unity.adaptiveperformance@4.0.1/Editor/Management/AdaptivePerformanceGeneralBuildProcessor.cs:94)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <97436df440ca462884c5332c1d8ebbe7>:0)



<pre>No Adaptive Performance provider package installed. Adaptive Performance requires a provider to get information during runtime. Please install a provider such as Adaptive Performance Samsung (Android) from the Adaptive Performance Settings.
0x00007ff72faa229d (Unity) StackWalker::GetCurrentCallstack
0x00007ff72faa7249 (Unity) StackWalker::ShowCallstack
0x00007ff730a733a1 (Unity) GetStacktrace
0x00007ff731134c02 (Unity) DebugStringToFile
0x00007ff72e9b8736 (Unity) DebugLogHandler_CUSTOM_Internal_Log
0x000001978cdd77c3 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
0x000001978cdd76db (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
0x000001978cdd7420 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
0x0000019827f2d028 (Mono JIT Code) UnityEngine.Debug:LogWarning (object)
0x000001982bb08093 (Mono JIT Code) UnityEditor.AdaptivePerformance.Editor.AdaptivePerformanceGeneralBuildProcessor:CheckInstalledPackages () (at ./Library/PackageCache/com.unity.adaptiveperformance@4.0.1/Editor/Management/AdaptivePerformanceGeneralBuildProcessor.cs:99)
0x0000019827b5cd10 (Mono JIT Code) UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
0x0000019827d9c115 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
0x00007ffd9cece0d4 (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ffd9ce0eb74 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3066)
0x00007ffd9ce0ed0c (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3113)
0x00007ff72f9b9724 (Unity) scripting_method_invoke
0x00007ff72f997944 (Unity) ScriptingInvocation::Invoke
0x00007ff72f992595 (Unity) ScriptingInvocation::Invoke<void>
0x00007ff72fae185b (Unity) Scripting::UnityEditor::EditorApplicationProxy::Internal_CallUpdateFunctions
0x00007ff7304e3342 (Unity) SceneTracker::Update
0x00007ff730605949 (Unity) Application::TickTimer
0x00007ff730a79cda (Unity) MainMessageLoop
0x00007ff730a7f540 (Unity) WinMain
0x00007ff731e68bae (Unity) __scrt_common_main_seh
0x00007ffe06047034 (KERNEL32) BaseThreadInitThunk
0x00007ffe07a02651 (ntdll) RtlUserThreadStart


Even tho I've got installed all the requirements.

What I have tried:

Nothing.............................................................
Posted
Updated 13-Aug-23 2:23am
Comments
Richard MacCutchan 13-Aug-23 8:23am    
Look at the first message, it is telling you what is missing and where the build system expects it to be installed.

1 solution

Try exactly what it suggests:
Quote:
Unable to detect SDK in the selected directory. C:\Program Files\Unity\Hub\Editor\2022.3.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\cmdline-tools\latest\bin\sdkmanager.bat does not exist. Android SDK command-line tools component is not found. Make sure "Command-line Tools (latest)" is installed in the SDK manager.
If command-line tools are installed, but this message is still shown, please restart the Unity editor.
If that doesn't fix it, you need to contact Unity and ask them ... Unity Customer Service: Technical Support & Training | Unity[^] may help.
 
Share this answer
 
Comments
Richard MacCutchan 13-Aug-23 8:31am    
I wonder why people think such messages are just cosmetic?
OriginalGriff 13-Aug-23 8:58am    
I suspect some of them can't read ... :D

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900