Hello. I have been working on an AR app for both Android and iOS. Most of development took place on Unity 5.5.2 or earlier.
After making an update to multiple related stuff - JDK, android SDK, Unity - I get some errors related to android sdk path and android tools (see complete log bellow).
After searching the interwebs for a solution, I tried the following:
- downgrading android tools to 25.3.2
- trying various versions of unity: 2017.1, 5.6.1, 5.2.2
- completely reinstalling JDK and android SDK
- combinations of the above
Do you have any other suggestions?
Here are the 4 error messages I get:
Error:Invalid command android
UnityEditor.HostView:OnGUI()
CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
C:/Program Files/Java/jdk1.8.0_131\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir=“C:/Users/rleu/AppData/Local/Android/sdk\tools” -Dfile.encoding=UTF8 -jar “C:\Program Files\Unity5.5.2\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar” -
stderr[
Error:Invalid command android
]
stdout[
]
exit code: 64
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)
UnityEditor.HostView:OnGUI()
Error building Player: CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
C:/Program Files/Java/jdk1.8.0_131\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir=“C:/Users/rleu/AppData/Local/Android/sdk\tools” -Dfile.encoding=UTF8 -jar “C:\Program Files\Unity5.5.2\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar” -
stderr[
Error:Invalid command android
]
stdout[
]
exit code: 64
UnityEditor.BuildPlayerWindow+BuildMethodException: Build failed with errors.
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x001b9] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:162
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:83
UnityEditor.HostView:OnGUI()