Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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
0
Question by DGH1988 · Oct 27, 2017 at 07:21 AM · androidbuild-errorsdkapk

Unable to list target platforms. I tried so many things based on other such posts but nothing changes!

I know this happens to many people and I keep trying what they did or the suggestions but here goes.

Android build on Windows 10 64 bit with unity 5.6.1f1.

Pop-up message when building:

"Unable to list target platforms. Please make sure the android sdk path is correct. See the console for more details. See the console for more details."

Then in the console 3 error messages (marked with for readability): - 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/jdk-9.0.1\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\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. C:/Program Files/Java/jdk-9.0.1\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

stderr[ Error:Invalid command android ] stdout[

] exit code: 64


Now the things I have tried:

1) Update unity to version that is supposed to fix this. (Now I am on 5.6.1f1) 2) Install both 32 and 64 bit version of JDK. 3) I fully installed Android Studio and downloaded pretty much everything in their sdkmanager. 4) Changed the sdk location outside of the user/appdata/local/etc since it is a hidden folder (eventhough I unhid it) since I feared it might interrupt the process somehow. Now the SDK location is just in c:/ and ofcourse update the path in Unity (which finds it because if I select the wrong folder on purpose it won't close the the little pop-up browser) 5) Tried various versions of the command line tools since some people said that would help. 6) Many other random things that I can't even remember.

I've lost already 3 days on this. My project needs to go on. This is the first thing in a good 6 months I really got stuck where I can't reason my way out of it. All of the solutions are things that have worked for other people but nothing changes in mine.

Any help would really be appreciated!

Cheers,

Daan

Comment
Add comment · Show 2
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 spilat12 · Nov 01, 2017 at 07:07 PM 0
Share

Having the same problem, please help! I also tried everything... This is insanity, I spent more than 3 days trying to fix it.

avatar image DGH1988 · Nov 02, 2017 at 02:28 AM 0
Share

Still struggeling, Siarhei. Will post if/when I fix it! I am just continueing my project and waiting for the golden tip. If nothing arrives I will just try to switch platform (windows --> mac). $$anonymous$$aybe the fix will be easier...

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by shubham-j · Oct 27, 2017 at 09:30 PM

Did you try downloading just the SDK and replacing the tools folder?

Comment
Add comment · Show 3 · 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 DGH1988 · Oct 30, 2017 at 02:59 AM 0
Share

You mean downloading the command line tools alone? That is what I did first and since that gave the same error as the one listed above. Since then I Installed the full android studio, changed the command line tools version a few times, updated Unity, changed the SD$$anonymous$$ location, tried different versions of JD$$anonymous$$ and other stuff I can't remember. None of it worked.

avatar image shubham-j DGH1988 · Nov 01, 2017 at 07:20 PM 0
Share

Yes. But replace just the 'tools' folder in your SD$$anonymous$$ folder by the tools folder in the command line only download. That worked for me.

Also, what JD$$anonymous$$ are you using? I downgraded $$anonymous$$e from 9 to 8, and that worked.

avatar image DGH1988 · Nov 02, 2017 at 02:26 AM 0
Share

Shubham, thanks for your advice but tried it already. Gave it another go out of desperation but to no avail...

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

200 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 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

Android app not building after switching to il2cpp 0 Answers

[Android VR app build error] CommandInvokationFailure: Gradle build failed. 0 Answers

Temp\gradleOut\launcher\build\outputs\bundle\release\launcher-release.aab does not exist 0 Answers

Unity says that I'm missing my NDK and SDK libraries, but I have them installed via Unity hub? 1 Answer

Facebook SDK integration in Unity 2018 0 Answers


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