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
4
Question by Ben_Huang4163 · Sep 23, 2017 at 02:10 PM · android buildandroid sdkunity remote

Can't not set up android sdk path

Hi: I'm learning how to build an android game. i used the App Unity remote 5 to connect my android phone to Unity editor. When i hit "play" button, i got a warning " Set-up Android SDK path to make Android remote work" . If I tried to build the project, what i got is asking me to update Android SDK it popped up a instruction windows said"SDK Plamform Tools version 0.0.0<23.0.0" if I continued click the update button, it showed another warning like this:

alt text then i got three errors:

 Error:Invalid command android
 
 UnityEditor.HostView:OnGUI()
 
 
 CommandInvokationFailure: Unable to update the SDK. Please run the SDK Manager manually to make sure you have the latest set of tools and the required platforms installed. See the Console for more details. 
 C:/Program Files/Java/jdk1.8.0_144\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Program Files/sdk-tools-Adroid\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" android update sdk -a -u -t tool,platform-tool,build-tools-23.0.2
 
 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 update the SDK. Please run the SDK Manager manually to make sure you have the latest set of tools and the required platforms installed. See the Console for more details. 
 C:/Program Files/Java/jdk1.8.0_144\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Program Files/sdk-tools-Adroid\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" android update sdk -a -u -t tool,platform-tool,build-tools-23.0.2
 
 stderr[
 Error:Invalid command android
 ]
 stdout[
 
 ]
 exit code: 64
 


i've installed jdk successfully. (i've set up "JAVA_HOME" variable, path and CLASSPATH at Environment Variable, and checked with cmd commend )

About the Android SDK, what I download is "the command line tools", sdk-tools-windows-3859397.zip this zip only contains a folder name "tools", its content includes: alt text

I store this "tools" folder at location C:\Program Files\sdk-tools-Adroid , at Environment Variable settings , i created: ANDROID_HOME C:\Program Files\sdk-tools-Adroid PATH C:\Program Files\sdk-tools-Adroid

both in user variable and system variable. I tried everything i found, i don't know what to do to make this work, can anyone help me please?

------------Update----------------------------- i installed the whole Android Studio pack, then run the SDK Manager inside the software and update, it finally work. But I still don't know how to make it work by using the SDK command line tools.

02.jpg (26.5 kB)
03.jpg (33.6 kB)
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 HopeMaven · Nov 30, 2017 at 06:45 PM 0
Share

@PRI$$anonymous$$4T - I have same problem!!! Uninstalled Android Studio and installed again.

C:\Users\ username\AppData\Local\Android\sdk

I need someone to logon to my laptop with TeamViewer or something so they can help!!!

Paul

avatar image PRIM4T HopeMaven · Dec 01, 2017 at 01:11 AM 0
Share

Hey there Hope$$anonymous$$aven!

I am still unable to export to android. I use "C:\Users\ username\AppData\Local\Android\sdk" but still no luck.

I am going to look for another solution and will report here in case i find something. Good luck to you my friend and please write here if you have some suggestions. Thank you and greetings PRI$$anonymous$$4T

5 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by HungPark · Jan 15, 2018 at 08:41 AM

Hung Park. I solved this head aching issue very easily. Go to the following site.

Https://developer.android.com/studio/releases/platform-tools.html

Then, go to download

Then, select one for your platform(one of Windows, Mac or Linux)

Then, unzip(platform - tools - latest - windows(This is for me))

Then, you’ll get the following file.

 platform-tools-latest-windows(AndroidSDK)

Then, change its path for your use.

Hope helpful to you.

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 farazk86 · Dec 30, 2018 at 03:33 PM 0
Share

Thank you. That fixed my problem

avatar image TreyH · Feb 11, 2019 at 05:13 AM 0
Share

Worked for me, ty.

avatar image
0

Answer by Bunny83 · Sep 23, 2017 at 02:20 PM

You have to manually run the SDK Manager of the Android SDK. It's usually in the root folder of your SDK folder. It's named "SDK Manager.exe"

Once started the manager should first update itself to the newest manager version and also download a list of available packets. Make sure you install (check them in the list) the latest

  • Android SDK Tools

  • Android SDK Platform-tools

  • Android SDK Build-tools

You also need to have at least one Android version installed. Currently i only have Android 8.0.0 (API 26)

Make sure you have all those selected and finally click Install. If you have never updated the SDK it can take quite a bit of time.

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 Bunny83 · Sep 23, 2017 at 02:27 PM 0
Share

In case the manager has problems installing you should first make sure you closed Unity and make sure the Android Debug Bridge (adb.exe) doesn't run in the background (check the Task$$anonymous$$anager and kill it if it's running).

If you still have issues you may need to start the SD$$anonymous$$ $$anonymous$$anager with ad$$anonymous$$ rights. (right click --> Run as Ad$$anonymous$$istrator).

It's generally recommended to install the Android SD$$anonymous$$ in a "simple" and short path. By "simple" i mean avoid spaces and other special characters in folder names. I usually install it in a folder inside the root of one of my drives. Currently i have it here: `C:\Android`

avatar image Ben_Huang4163 · Sep 23, 2017 at 03:57 PM 0
Share

Thank you Bunny83. The problem is that the sdk-tools-windows-3859397.zip file which i downloaded from the official website, is zip file , it is a no-need-to install version. It has only one folder tools after i upzipped it. there is no SD$$anonymous$$ $$anonymous$$anager.exe. and this is the command line tools version that the Unity tutoral recommend. i saw some other tutorials showed that there are SD$$anonymous$$ $$anonymous$$anager.exe, Android SD$$anonymous$$ Platform-tools folder and some other files in their the command line tools , but $$anonymous$$e version is not. in this case, do i have to download the Android Studio ins$$anonymous$$d? i guess there should be a SD$$anonymous$$ $$anonymous$$anager.exe file in it.

avatar image
0

Answer by PRIM4T · Nov 24, 2017 at 11:39 PM

Hey there Ben, i have the exact same problem and i also wasnt able to find a solution. I also tried this solution ( https://answers.unity.com/questions/652886/android-sdk-build-error-1.html ) but it didnt work for me.

Hope someone can help out here! Thanks in advance and greetings PRIM4T

Comment
Add comment · Show 4 · 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 shakecaine · Nov 25, 2017 at 10:33 AM 0
Share

Did you try downloading full package with Android Studio? It is the best way to ensure you get Android SD$$anonymous$$ as it is really easy to choose what SD$$anonymous$$ you want from Android Studio itself to download.

avatar image PRIM4T shakecaine · Nov 25, 2017 at 12:52 PM 0
Share

Hey Shakecaine! Thank you for replying.

I installed and reinstalled Android Studio like 5 times now...same thing with unity itself. Still no success. I am now in the process of downloading every version of the sdk via the android studio, maybe this will work. Gonna come back if i got some results.

Greetings PRI$$anonymous$$4T

avatar image Ben_Huang4163 PRIM4T · Nov 27, 2017 at 02:38 PM 0
Share

Hi PRI$$anonymous$$4T: I hope the problem you met have been solved. In my case, I installed the full package of Android Studio and it workes. if you still got the problem, maybe you need to ensure the sdk path in Unity setting and your Enviromenet Veriable is C:\Users\ username\AppData\Local\Android\sdk; and the Android Studio install path is C:\Android. this may work. Good luck and take care.

avatar image PRIM4T · Dec 14, 2017 at 05:26 AM 0
Share

Hey there, Gentleman!

I finally found a solution following this video: https://www.youtube.com/watch?v=1yLDxI$$anonymous$$uRlo

The solution to my problem is at 50 seconds of the video. For some reason i had to replace the "tools" folder with the files which you will find in the description of the video.

Thank you everyone for trying to solve it!

Stay creative and greetings PRI$$anonymous$$4T

avatar image
0

Answer by vivek4dhiman · Apr 14, 2020 at 02:30 PM

This might help https://www.youtube.com/watch?v=ftPxYWjFIVk

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 harperrhett · Aug 06, 2020 at 10:43 PM

Hi, I fixed this problem by downloading Android SDK tools, downloading the SDK version I wanted, and then dragging that version into the place where Unity stores its SDK versions (if you've downloaded any at all). I changed my default location for Android but if you find your folder then the versions are under platforms, and you can drag your desired version to "C:\Program Files\Unity\Hub\Editor\2020.1.1f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms" but that path will change depending on the version of Unity you have as well as which drive Unity is stored on. Make sure that in the Unity editor under "preferences>external tools" you have "Android SDK tools installed with Unity" turned on. Anyways good luck, I spent hours figuring this out.

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

77 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

Related Questions

Unable to list target platforms error for Android build on 5.5.2f1 1 Answer

Android SDK not found or invalid unity. 3 Answers

Export to android: CommandInvokationFailure: Failed to build apk. 1 Answer

Error when building for Android, SDK path is incorrect while it is. 0 Answers

BuildFailedException: Incremental Player build failed! 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