Is not a directory?

Hey Guys!

I’ve encountered this problem and googled and youtubed for a couple of hours now so i hope that you guys maybe can help me out on this.

When i try to build, i get this popup:

and then these error messages:

Error:C:\Users\pimmi\AppData\Local\Android\Sdk\tools is not a directory. calculated from system property com.android.sdkmanager.toolsdir

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

**CommandInvokationFailure: Unable to resolve build tools directory. **
C:/Program Files/Android/Android Studio/jre\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir=“C:/Users/pimmi/AppData/Local/Android/Sdk\tools” -Dfile.encoding=UTF8 -jar “C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar” -

stderr[
Error:C:\Users\pimmi\AppData\Local\Android\Sdk\tools is not a directory. calculated from system property com.android.sdkmanager.toolsdir
]
stdout[

]
exit code: 64
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0020e] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:181
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:88
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

**Error building Player: CommandInvokationFailure: Unable to resolve build tools directory.
C:/Program Files/Android/Android Studio/jre\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir=“C:/Users/pimmi/AppData/Local/Android/Sdk\tools” -Dfile.encoding=UTF8 -jar “C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar” -

stderr[
Error:C:\Users\pimmi\AppData\Local\Android\Sdk\tools is not a directory. calculated from system property com.android.sdkmanager.toolsdir
]
stdout[

]
exit code: 64**

I can’t wrap my head arround this. can anyone please help??

I told unity about
sdk C:/Users/richp/AppData/Local/Android/Sdk
AND
jdk C:/Program Files/Android/Android Studio/jre

then
I needed to tell windows system environment variables about JAVA_HOME because unity calls a script in the sdk and it doesn’t know where to find java.
notice the backward slashes
C:\Program Files\Android\Android Studio\jre

from the search on the task bar type environment variables , then select the system one offered.

Its possible you may need to run android studio and choose the sdk manager to download the correct version of tools

Privacy & Terms