As of today, I just found out that if you install the Android SDK fresh or update the Android SDK, it appears the command “android” has been deprecated:
The android command is no longer available.
For manual SDK and AVD management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
This prevents Unity from being able to build Android due to the following errors:
Error:Invalid command android
CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
Error building Player: CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
I am currently trying to find a workaround, but likely it’s going to involve downgrading the SDK tools until Unity supports the new version. I will update here with instructions on how to downgrade when I figure it out, haha!
I downgraded to the version you did (as posted above) - r25.2.5.
I suspect the issue is that I’m using the Unity Beta and that there’s a temporary incompatibility. The beta is unfortunately required for my purposes, as I’m working with the daydream headset.
Please consider renaming this topic to:
“[Solved] Android command deprecated, error: Unable to list target platforms”
I was looking 2 days for the solution of:
“Unable to list target platforms”, now after I found the solution I see this is already solved here.
I installed fresh android studio with latest SDK’s,
I installed fresh JAVA JDK
Tried 2017.1 and patch 3
building EMPTY SCENE:
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_144\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir=“C:\Users\PEP\AppData\Local\Android\sdk\tools” -Dfile.encoding=UTF8 -jar “C:\Program Files\Unity20171p3\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar” -
Once on my computer, tried to launch the SDK manager using “sdkmanager.bat”, “android.bat”, “avdmanager.bat” > all of them fail and give me an error message
So I installed Android Studio. From there, I could access the SDK manager and installed SDK Platforms API28 which is “Partially installed” for some reasons. I DID click on “Show Package details” and installed all the remaining package > it’s still mentioned as “Partially installed”.
In “SDK tool”, I installed the “Google USB driver”
Of course, I installed the latest JDK version (jdk-10.0.2) and put the path in Unity
Here are my 2 paths :
SDK : C:/Users/Nicoroots/AppData/Local/Android/Sdk
JDK : C:/Program Files/Java/jdk-10.0.2
I am able to visualize my game on my Android device, but when it comes to building it, I have the same issue :
And the console says : "Error:Invalid command android CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details. Error building Player: CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details."
Which version of SDK are you guys using, I’m completely lost here. Seems I’m missing something, but I can’t tell what exactly ? Anyone could give me a hand please ? I’m using Windows 8.1
So, I eventually sorted it out and fixed it.
I had to uninstall JDK 10 and installed 8 instead.
(I DID try to install 8 first and change the path, but Unity would not build my game.)
So this made the job.
One thing though for Unity people : Perhaps you should implement an error message in the console and/or even a warning while in the “build setting” Window, saying something like “Eh guys, please keep in mind that JDK 9+ is not compatible with Unity at the moment, we are working on it, etc…”
That would be very appreciated, I think… and would save a lot of time.