Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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
9
Question by hardartcore · Mar 03, 2017 at 10:55 AM · physicsbuildbuild-error

Android build CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.

After an update of the latest versions of Android SDK it start to throw an error while trying to build an android app. Here is the stacktrace:

 Error building Player: CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details. 
 /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/hardartcore/Library/Android/sdk/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar" -
 
 stderr[
 Error:Invalid command android
 ]
 stdout[
 
 ]
 exit code: 64


and

 CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details. 
 /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/hardartcore/Library/Android/sdk/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/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()
 
Comment
Add comment · 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 EdwinSly · Jan 05, 2018 at 02:32 AM 0
Share

hello, in this video i explain how to resolve this problem https://youtu.be/UaQe-fns$$anonymous$$4w

10 Replies

· Add your reply
  • Sort: 
avatar image
34

Answer by jgwinner · Mar 08, 2017 at 08:06 PM

Upgrading to the latest does not work; that's what caused my problem :) They removed a feature and called it "Deprecated" without any warnings (this is not deprecation, it's removal).

The fix is to rename the "Tools" directory in the Android SDK.

Go to Unity, got to Edit->Preferences, then "External Tools"

Note where the Android SDK is located.

Go there, and rename the "Tools" folder to Tools-XXXX (replace XXX with version, or just call it Tools-Old). This is so you have a backup. You could just delete the folder.

Then, download this file:

http://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip

Unzip it to the "Android SDK" location you found in the first step. Make sure it's "Tools".

Then, exit and reload Unity - build. It should work.

Also, thanks to @Vladimir-Niakhai, the MacOS version is at:

https://developer.android.com/studio/index.html

and look for "tools_r25.2.3-macosx.zip"

Credit to this thread on stack overflow: http://stackoverflow.com/questions/42538433/not-finding-android-sdk-unity and https://code.google.com/p/android/issues/detail?id=235455#makechanges

== John ==

Comment
Add comment · Show 13 · 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 allanmelo · Mar 14, 2017 at 10:03 PM 1
Share

It fixed my problem. Thanks :)

avatar image yuriythebest · Mar 20, 2017 at 09:43 PM 1
Share

thank you so much! I spent the last hour trying to understand what I was doing wrong (since I installed unity + android sdk) several times previously - never expected it to get harder/ for there to be a new "trick"!

avatar image jgwinner · Mar 22, 2017 at 06:36 AM 0
Share

No problem, glad I could help!

avatar image Akimov_A_A · Apr 11, 2017 at 07:48 AM 0
Share

Go there, and rename the "Tools" folder to Tools-XXXX (replace XXX with version).

I do not understand what should be on the place of XXXX. Can someone show example of tools dir name?

avatar image PixlShrk Akimov_A_A · May 02, 2017 at 01:43 PM 1
Share

anything. Its just so that the newly downloaded folder doesn´t override the old folder because its the same name. U can delete it or rename it so that u have a backup.

avatar image jgwinner Akimov_A_A · May 04, 2017 at 04:49 PM 1
Share

PixlShrk nailed it - it's just so you have a backup, but you don't even really need the old "Tools" folder. You could even name it Tools-Old or Tools-Bad. The name doesn't actually matter as you won't be using it. I changed my answer slightly to make it more obvious.

avatar image Akimov_A_A jgwinner · May 04, 2017 at 06:42 PM 0
Share

Thanks for you, guys.

avatar image firestoke · May 08, 2017 at 04:04 PM 0
Share

it fixes my problem!!! thanks so much! :)

Show more comments
avatar image
2

Answer by ginoadriano · Mar 14, 2017 at 02:49 PM

Any solution for this on Mac OSX?

Comment
Add comment · 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 Vladimir-Niakhai · Mar 20, 2017 at 01:56 PM 2
Share

You can found "tools_r25.2.3-macosx.zip" at the bottom of that page https://developer.android.com/studio/index.html

avatar image jgwinner Vladimir-Niakhai · Mar 22, 2017 at 05:08 PM 0
Share

Thanks! I figured out how to edit my answer and gave you credit :)

avatar image
0

Answer by Knertified · Mar 03, 2017 at 05:12 PM

I fixed this problem by going into Android Studio, Uninstalling SDK Build tools, restarting Android Studio and upgrading to the latest build tools.

Comment
Add comment · Show 1 · 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 Knertified · Mar 22, 2017 at 01:11 PM 0
Share

FYI, $$anonymous$$y solution above was for macOS. I didn't have to rename any folders.

avatar image
0

Answer by batchku · Apr 08, 2017 at 11:00 PM

I am having the same problem. I'm using Unity 5.6f3 and trying to build with the latest SDK (Android 7.1.1), on windows 10.

I've tried @jgwinner's suggestion of replacing the 'tools' folder in the android SDK with the one from: http://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip

Still same error.

I have also tried @Knertified's suggestion of uninstalling and reinstalling the SDK Tools with Android Studio's SDK Manager. Still the same error.

Are you all succeeding in building with Unity 5.6f3 for Android now? What exact version of the SDK are you using and where did you get it (from a link, or using the Android Studio SDK Manager?)

Comment
Add comment · 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
0

Answer by batchku · Apr 08, 2017 at 03:34 AM

I am having the same problem. I'm using Unity 5.6f3 and trying to build with the latest SDK (Android 7.1.1), on windows 10.

I've tried @jgwinner's suggestion of replacing the 'tools' folder in the android SDK with the one from: http://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip

Still same error.

I have also tried @Knertified's suggestion of uninstalling and reinstalling the SDK Tools with Android Studio's SDK Manager. Still the same error.

Are you all succeeding in building with Unity 5.6f3 for Android now? What exact version of the SDK are you using and where did you get it (from a link, or using the Android Studio SDK Manager?)

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 jgwinner · Apr 08, 2017 at 06:45 AM 0
Share

I was using 5.6.0.b4, and the steps I posted fixed it. I got the r25.2.5 from the zip posted; check out the stack overflow link, they may have more detail.

I'm happily building Android apps.

Did you replace the folder, or did you rename the folder, then create a new folder called 'tools' and install tools_r25.2.5-windows from the zip? Not sure if it makes a difference, but it's a thought. I'd make sure none of the newer files are in that directory. You're putting something older over the top of newer stuff (that broke the build), so just copying things on top might not work.

Uninstalling and reinstalling never fixed it, as the latest disabled a 'deprecated' function because someone doesn't understand the difference between 'removed' and 'deprecated'. It went from there to not there. Deprecated functions are supposed to be left in place, with a warning, until all tool chain users have a chance to remove it. This got removed all at once (see my links) and has broken a bunch of stuff.


== John ==

avatar image Continue · May 10, 2017 at 06:55 AM 0
Share

Oh I am using unity 5.6.0f3 and I tried every suggested solution but no success. Did you solved the issue?? Can I ask you how you solved it????

avatar image mreimondez · Jan 09, 2018 at 12:32 AM 0
Share

I would like to know if you could fix the problem. I'm having the same issue that you have/had. Please, tell me that you have found the solution!

  • 1
  • 2
  • ›

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

151 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

Related Questions

I can't catch Unity build errors via script 0 Answers

WebGL build failing Unity v5.2 0 Answers

Build error,How do you prevent this errorwhen you build? 0 Answers

UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors 0 Answers

Build crashes on load 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