- Home /
Unable to list target platforms. (Cant build into Android)
Just as the title says it gives me an error whenever i try to build for Android. Here's the error:
it also gives me this :
Please make sure the android sdk path is correct. See the Console for more details. C:/Program Files (x86)/Java/jdk1.8.0_111\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir="C:/Users/Laurynas/AppData/Local/Android/sdk\tools" -Dfile.encoding=UTF8 -jar "D:\UNITY!!\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
I DO have SDK and JDK 8 installed , i have linked them in unity (external tools). I've reinstalled SDK about 5 times now. this thing is just killing me...
Im running Unity 5.4.3f1 On windows 8.1.
I cant find the fix ANYWHERE i've been looking for it for about 4 days now. Please help im getting desperate!! :(
i would highly recommend avoiding exclamation marks in folder names for anything core like a unity installation. some tools might not deal with them right. ie "D:\UNITY!!\Editor..."
O$$anonymous$$FG!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! THAN$$anonymous$$ YOU SO $$anonymous$$UCH . You have no idea how fcking grateful i am. I never thought something like that would be the problem!!! THAN$$anonymous$$ YOU!!!!!!
guys plzz help, cannot convert my project to apk. plzz guys i request you, plzz...............
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_102\bin\java.exe -Xmx2048$$anonymous$$ -Dcom.android.sdkmanager.toolsdir="C:/Users/Ad$$anonymous$$/AppData/Local/Android/sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
stderr[ Error:Invalid command android ] stdout[
] UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String error$$anonymous$$sg) UnityEditor.Android.AndroidSD$$anonymous$$Tools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memory$$anonymous$$B, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String error$$anonymous$$sg) UnityEditor.Android.AndroidSD$$anonymous$$Tools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memory$$anonymous$$B, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String error$$anonymous$$sg) UnityEditor.HostView:OnGUI()
Answer by Cekavicius · Dec 06, 2016 at 02:11 PM
Found a fix!! THANKS ELENZIL!!! , My unity was save in a folder named "UNITY!!!!!" , i simply had to delete the exclamation marks and now it works! :)
Answer by shrinath-kopare · Mar 24, 2017 at 12:15 PM
Mac unity android sdk path setting
If you have Android Studio installed. The path for SDK is “/Users/username/Library/Android/sdk”.
But sometimes the “Library” folder is hidden. To see the hidden files, follow the link: http://ianlunn.co.uk/articles/quickly-showhide-hidden-files-mac-os-x-mavericks/ Or follow the steps below Open Terminal found in Finder > Applications > Utilities In Terminal, paste the following: defaults write com.apple.finder AppleShowAllFiles YES Press return Hold the ‘Option/alt’ key, then right click on the Finder icon in the dock and click Relaunch.
Once you done this. Open unity->Unity->Preferences->External tools
In that find SDK path option, click browse, then drag the “sdk” folder which you just opened above in Finder…
Done…
If its still giving error then consider below case:
Sometimes Unity won’t recognise Android Studio’s sdk tools and gives error and ask you to again set the path.
To solve this, download separate sdk tools from Google. Link : https://dl.google.com/android/repository/tools_r25.2.3-macosx.zip
Once you download the “tools” folder. Then copy it and replace it in “/Users/username/Library/Android/sdk”.
And try again…
I know this is not written well…but if you are struggling a lot ..if will just give you an correct hint. I struggled a lot for this issue…so wanted to help you all. Thank you…
Thanks! Loading SD$$anonymous$$ Tools from the link you provided totally fixed my problem on $$anonymous$$ac. Was a real head-scratcher until I came across your post. Thanks!
Welcome brother :) glad it helped you
Thank you! I tired your method, and Unity tells me the SD$$anonymous$$ version does not meet its requirement and it then download a working version into the folder I specified. Anyway, your method of providing a custom path worked!
Answer by rsodre · Apr 03, 2017 at 11:27 PM
This post helped me to fix the problem: https://forum.unity3d.com/threads/unity3d-5-5-0fx-unable-to-list-target-platforms-error.446096/#post-2977689
This one works, it is the problem with version of Android SD$$anonymous$$ Tools, just follow the steps in the link. Easy quick fix Thanks rsodre .
Answer by cakeslice · Dec 05, 2016 at 10:16 PM
Are you sure you followed all the steps in the installation of the SDK?
https://docs.unity3d.com/Manual/android-sdksetup.html
"In step 4 of Installing the SDK, be sure to add at least one Android platform with API level equal to or higher than 9 (Platform 2.3 or greater), the Platform Tools, and the USB drivers if you’re using Windows."
Here's what the paths in External Tools look in my pc:
SDK: C:/Users/MyName/AppData/Local/Android/android-sdk/
Java: C:/Program Files/Java/jdk1.8.0_73
Yes i have , but i've fixed the problem , my unity was saved in a folder "UNITY!!!" , i delted the Exclmation marks and now it works.
this guide is out of date, you need to install Android Studio now and ... it doesn't work
Answer by jamiahuswalton · Jun 12, 2017 at 08:38 PM
It looks like this was fixed in 5.6.1f1. I have the Android SDK Tools 26.0.2 installed and everything seems to run as expected.
Is this true for anyone else?
Was not fixed for me... still getting the above error as OP -- brand new Android SD$$anonymous$$ install, paths seem to be set correctly, and using 5.6.2f1...
Yes, that is strange. $$anonymous$$aybe try using 5.6.1f1?
Your answer
Follow this Question
Related Questions
CommandInvokationFailure: Gradle build failed when build android apk 0 Answers
Android Error building Player: CommandInvokationFailure: Failed to re-package resources 1 Answer
I can not build for android , error :Path is too long exception 1 Answer