Unity Latest update 2018.3
SDK Tools and Platforms up to date according to SDK Manager.
Trying to build and run Android Build Settings.
After updating the SDK, Unity still asks me to update the SDK by pressing a button built into the software. After I do this it tells me:
Unable to update the SDK. Please run the SDK Manager manually to make sure you have the latest set of tools and the required platforms installed. See console log for details.
When I take a look at the console, it tells me:
CommandInvokationFailure: Unable to update the SDK. Please run the SDK Manager manually to make sure you have the latest set of tools and the required platforms installed.
C:\Program Files (x86)\Android\android-sdk\tempToolsDir\bin\sdkmanager.bat --sdk_root=C:\Program Files (x86)\Android\android-sdk tools platform-tools "build-tools;28.0.3"
stderr[
Error: Failed to find package Files
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
]
stdout[
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <e1c3953b4cf040ddb1400046b1c34897>:0)
UnityEditor.Android.Command.RunWithStdin (System.Diagnostics.ProcessStartInfo psi, System.String errorMsg, System.Collections.Generic.IEnumerable`1[T] input) (at <e1c3953b4cf040ddb1400046b1c34897>:0)
UnityEditor.Android.AndroidSDKTools.RunAndroidSdkTool (System.String toolName, System.String arguments, System.Boolean updateCommand, System.String errorMsg, System.String toolsDir) (at <e1c3953b4cf040ddb1400046b1c34897>:0)
UnityEditor.Android.AndroidSDKTools.UpdateSDK (UnityEditor.Android.AndroidJavaTools javaTools) (at <e1c3953b4cf040ddb1400046b1c34897>:0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKComponentDetector.Update (UnityEditor.Android.AndroidSDKTools sdkTools, UnityEditor.Android.AndroidJavaTools javaTools, System.Version minVersion, UnityEditor.Android.PostProcessor.ProgressHandler onProgress) (at <e1c3953b4cf040ddb1400046b1c34897>:0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK.EnsureSDKComponentVersion (UnityEditor.Android.AndroidJavaTools javaTools, System.Version minVersion, UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKComponentDetector detector) (at <e1c3953b4cf040ddb1400046b1c34897>:0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <e1c3953b4cf040ddb1400046b1c34897>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <e1c3953b4cf040ddb1400046b1c34897>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
I have updated the SDK manually, it also gave me an error there. I fixed it doing this trick:
Can't update \tools - Android SDK Command Line Tools for Windows
Anyway, I ran Unity with administrator, I ran the cmd with administrator for the manual updates and yet it still wont build. Help needed, thanks.
I had a similar issue trying to update my android sdk and fixed it by running the sdk manager manually. In my Unity Editor console it printed out a long license agreement along with errors telling me what to do.
Firstly, if it does not exist, create an empty repositories.cfg file in your .android folder. For me that file is located at C:\Users\myuser\.android
Next, run the sdkmanager.bat like this in command prompt (your results and path may vary depending on your Unity version).
"C:\Program Files\Unity\Hub\Editor\2019.2.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\bin\sdkmanager.bat" "platforms;android-29"
I was then able to press y and accept the license.