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 /
avatar image
0
Question by TommyJ · Nov 24, 2016 at 04:26 AM · c#androidandroid buildandroid sdkandroid-sdk

Setting android tools location in unity

In Unity 5.1, when I build my project for Android I get this error. I believe this is cause because I was messing around with some of the variables in cmd. It used to build perfectly fine before I made any changes. The error says its looking in /android-sdk/ though I know this is incorrect, and its under just /sdk/. I tried reinstalling android SDK but that didn't work, and I also tried looking for com.android.sdkmanager.toolsdir to edit the location of the tools directory but I had no luck. Any help? :)

 CommandInvokationFailure: Unable to resolve build tools directory. See the Console for more details. 
 C:\Program Files (x86)\Java\jdk1.7.0_71\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir="C:/Users/OWNER/AppData/Local/Android/android-sdk\tools" -Dfile.encoding=UTF8 -jar "C:/Program Files/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar" -
 
 stderr[
 Error:C:\Users\OWNER\AppData\Local\Android\android-sdk\tools is not a directory. calculated from system property com.android.sdkmanager.toolsdir
 ]
 stdout[
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 hexagonius · Nov 25, 2016 at 12:09 AM 0
Share

https://docs.unity3d.com/$$anonymous$$anual/android-sdksetup.html

point 5?

avatar image TommyJ hexagonius · Nov 25, 2016 at 02:40 AM 0
Share

There's my problem. The SD$$anonymous$$ path was set to the wrong folder, not sure how that got changed. Thank you for the help! ;)

4 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by vartv27 · Oct 19, 2017 at 05:50 AM

I have same problem.

I fixed by android sdk tool version downgrade.

The steps.

Delete android sdk "tools" folder : [Your Android SDK root]/tools -> tools Download SDK Tools: http://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip Extract that to Android SDK root Build your project

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 AlienPentiumX · Oct 19, 2017 at 01:01 PM

I had exacly the same problem with the same console message!

Install Android NDK. I recomend you to download NDK, SDK and tools via Android Studio's SDK Manager. Some components in your project require NDK to make the Android Build (.apk). At least this worked on me.

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 tsibiski · May 15, 2018 at 04:46 PM

I am not sure why the others suggested you re-download Android tools, since you mentioned that Unity was trying to point to the wrong directory. To fix the directory problem, simply:

Go to Unity > Preferences > External Tools and modify the path to your Android SDK there.

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 firez2469 · Jul 12, 2018 at 05:11 PM

I'm facing this issue even though I've installed all the tools, including the ndk, and have gone through every step of the process to fix this problem. I've downloaded a downgraded version of the sdk, which still gave me the same error message. I've found the path for unity for the sdk, ndk, and jdk, and none seem to get rid of this error message. I've ensured that all my settings on my android phone are set for developer and allow me to debug. I can't figure out what's wrong.

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

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

10 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

Related Questions

How to get Android 10 (API Level 29) 1 Answer

AndroidApiLevel30 ? 0 Answers

com.android.tools.r8 compilation error please help 0 Answers

Cannot install apk in android 8.0.0 (API level 26) 0 Answers

Do i need Android Studio or Xamarin? 2 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