Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
729 views
in Technique[技术] by (71.8m points)

unity3d - not finding android sdk (Unity)

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_121injava.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/great/AppData/Local/Android/Sdkools" -Dfile.encoding=UTF8 -jar "C:Program FilesUnityEditorDataPlaybackEnginesAndroidPlayer/Toolssdktools.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_121injava.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/great/AppData/Local/Android/Sdkools" -Dfile.encoding=UTF8 -jar "C:Program FilesUnityEditorDataPlaybackEnginesAndroidPlayer/Toolssdktools.jar" -

stderr[
Error:Invalid command android
]
stdout[

]
exit code: 64

Screenshot:

screenshot

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I have same problem.

I fixed by android sdk tool version downgrade.

The steps.

  1. Delete android sdk "tools" folder : [Your Android SDK root]/tools -> tools

  2. Download SDK Tools: http://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip

  3. Extract that to Android SDK root

  4. Build your project


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...