• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
Question by bigremo · Oct 05, 2017 at 01:19 PM · error messagesdkerror builderror-building-playerjar

I cannot build to android Unity 2017.1.1f1 (Unable to List Target Platforms)

I have tried using Unity 5.6, Unity 2017 1.1f1, and the Unity Beta 2017.2.0f2 and I get the same error each time. I have the latest Android Studio, SDK, Java JDK, and Win 10. I have the correct paths in Unity that lead to the SDK and JDK. Everything in the program works perfectly, testing is done, I'm ready to market, and, yes, I've even done this before. But I cannot build my apk due to this system error.

Traditionally, this error is caused by a clash between Android Studio Tools and Unity. I have tried all the known workarounds that I can find (installing older versions of SDK Tools, older versions of Unity, beta versions of Unity, etc). I've been reading the manual, the forums, and the many workaround solutions. I've been swapping files and reinstalling everything for the last couple days and I just cannot get beyond this. The old workarounds are not working for me.

Does anyone know a way around this? Nothing theoretical, I want the Unity and Android Studio version pair that are actually allowing you to build right now. If you have a working Unity-AndroidStudio pair, I can, at least, figure out if it is just me or not.

Thanks!

Error follows: CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details. D:/Java/jdk-9\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="D:/Android/sdk\tools" -Dfile.encoding=UTF8 -jar "D:\Unity\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. D:/Java/jdk-9\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="D:/Android/sdk\tools" -Dfile.encoding=UTF8 -jar "D:\Unity\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()

Comment
kamran-bigdely

People who like this

1 Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SombreErmine · Oct 06, 2017 at 07:36 AM 0
Share

I've been having the same problem all day, and trying different answers didn't work. I decided to nuke everything and start from scratch with a fresh install of 2017.1.1f1, Android SDK, and JDK, and then I followed this guide to manually install the specific JDK and Android SDK versions that work with Unity: http://devlog.markhlavac.com/2017/06/30/installing-android-sdk-for-unity3d-using-sdk-tools-and-cli/

(the only 2 things I had to do different was that (1) the Android SDK path needed to end in SDK25/ and not SDK25/tools/ and (2) I had to change the PATH environment variable entry for Java to point towards my JDK8 installation) (not sure if you'd encounter the same issues though)

4 Replies

  • Sort: 
avatar image

Answer by bgmulti15a · Oct 06, 2017 at 10:24 AM

First thing download and install JDK version 8 if you don't have it and set it as your jdk on unity (jdk path after installation is usually C:/Program Files/Java/jdk):

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Then download and extract this file:

https://dl.google.com/android/repository/tools_r25.2.3-windows.zip?hl=id

Inside you will find a folder called "tools", cut it.

Now go to the location where your sdk is located, usually the path is C:\Users\"username"\AppData\Local\Android\sdk (AppData is a hidden folder, make sure your system settings allow you to see hidden folders).

Now that you are inside the sdk folder, you will see a folder named "tools". Rename it as "tools_OLD".

Last but not least, paste here the "tools" folder that you have cut earlier.

This should work.

Comment
bigremo
zukinet
mcculloughj7
kamran-bigdely
exmachtitan
BroadbentStudios

People who like this

6 Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image kamran-bigdely · Mar 28, 2018 at 10:27 PM 0
Share

The main thing that helped me was this --> "Now that you are inside the sdk folder, you will see a folder named "tools". Rename it as "tools_OLD".Last but not least, paste here the "tools" folder that you have cut earlier."

avatar image exmachtitan · Apr 07, 2018 at 11:25 PM 0
Share

just helped me as well

avatar image

Answer by nipundavid · Oct 19, 2017 at 04:45 PM

I tried the above solution , but it didn't worked in my case

Comment
jserrano

People who like this

1 Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image bgmulti15a · Oct 23, 2017 at 11:41 AM 0
Share

Which error do you see?

avatar image nipundavid bgmulti15a · Oct 25, 2017 at 03:29 PM 0
Share

http://answers.unity3d.com/questions/1422869/commandinvokationfailure-unable-to-list-target-pla-1.html

avatar image

Answer by bigremo · Oct 19, 2017 at 04:56 PM

In the end, i used Unity 2017.1.1f1 and the latest Android SDK, but had to use an older Java JDK (#8, not #9) to make it work. I did not need to change the tools files or anything like that, I used the latest as-downloaded, off-the-shelf versions of both Unity and Android SDK with the old Java JDK 8.

Comment
overactiongamestudio

People who like this

1 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by mcculloughj7 · Mar 03, 2018 at 11:17 PM

Having similar issues. jdf version 8 . did the "tools" swap. works now. so frustrating!

Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta by June 9. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

Follow this Question

Answers Answers and Comments

121 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Error Building APK 1 Answer

Error while trying to build XCode project 0 Answers

Build completed with a result of 'Failed'. 0 Answers

" Error building player because script class layout might be incompatible between the editor and the player." 1 Answer

Error building player because scripts have compile errors in the editor 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges