Error:
Invalid command android
UnityEditor.HostView:OnGUI()
CommandInvokationFailure:
Unable to list target platforms. Ple
These are the steps that eventually worked for me...
Install JDK jdk1.8.0_131 (yes, this specific version, not a later version) and set it as the JDK Path in Unity.
Delete android sdk tools folder : [android_sdk_root]/tools
Download SDK Tools v25.2.5 (this specific version) from http://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip
Extract the tools folder in that archive to Android SDK root
Build your project
Delete android sdk "tools" folder : [Your Android SDK root]/tools -> tools
Download SDK Tools: http://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip
Extract that to Android SDK root
Build your project
After that it didn't work for me yet, I had to
Go to the Java archives (http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html)
Search for the jdk-8u131 release.
Accept the Licence Agreement,make an account and download the release.
Install it and define it as JDK path in Unity.
source : https://www.reddit.com/r/Unity3D/comments/77azfb/i_cant_get_unity_to_build_run_my_game/
1- Just open https://developer.android.com/studio/index.html
2- scroll down to the bottom of that page
3- download last version of tools for your OS (for example tools_r25.2.3-windows.zip)
4- Unzip it
5- Delete folder tools from previous Android Sdk folder
6- Copy new folder tools to Android SDK Folder like this image:
Unity 5.6.1 / 2017.1 fixes the Android SDK Tools 25.3.1+ compatibility issue. This is noted in Unity bug tracker under issue 888859 and their 5.6.1 release notes.
I have same problem.
I fixed by android sdk tool version downgrade.
The steps.
Delete android sdk "tools" folder : [Your Android SDK root]/tools -> tools
Download SDK Tools: http://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip
Extract that to Android SDK root
Build your project