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 GameCash · Apr 07, 2017 at 09:30 AM · androidunity 5build-errorerror messagebuild and run

Please Help! CommandInvokationFailure and other build errors

At this point I am almost about to switch game engines i'm getting so frustrated. I am currently creating a game and i'm at the testing stage, so i downloaded the testing example provided by unity with the red cube etc. no matter what i do for {android} there seems to be a problem with the SDK. I have tried all solutions at this point, re-downloading older one, this and that. so i have boiled it down to 2 errors, 1 with the older SDK, and 1 with the newer SDK with android manager...

Here is the problem with the old SDK : Error building Player: CommandInvokationFailure: Unable to resolve build tools directory. See the Console for more details. C:/Program Files/Java/jdk1.8.0_121\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/imabe/Desktop/SSDDKK/tools\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" - and NullReferenceException: Object reference not set to an instance of an object UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSdk.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessAndroidPlayer.PrepareForBuild (BuildOptions options, BuildTarget target) UnityEditor.Android.AndroidBuildPostprocessor.PrepareForBuild (BuildOptions options, BuildTarget target) UnityEditor.PostprocessBuildPlayer.PrepareForBuild (BuildOptions options, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:98) UnityEditor.HostView:OnGUI()

with the other new SDK its: 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/jdk1.8.0_121\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/imabe/AppData/Local/Android/sdk1\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()

PLEASE HELP, I WANT TO REALLY USE UNITY3D INSTEAD OF THE OTHERS. this problem occurs with my game and the unity test one. THANK YOU

Comment
Add comment · Show 5
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 GameCash · Apr 06, 2017 at 06:29 PM 0
Share

Please help

avatar image meat5000 ♦ · Apr 07, 2017 at 09:35 AM 0
Share

Try to not use the desktop

-Dcom.android.sdkmanager.toolsdir="C:/Users/imabe/Desktop/SSDD$$anonymous$$$$anonymous$$/tools\tools"

Everything that you use on your desktop... place it in a proper folder just off the root of your drive.

C:/WOR$$anonymous$$/SD$$anonymous$$/ for example.

Then, read the error. You see things like this in it:

Please make sure the android sdk path is correct

Its trying to tell you in its arse backwards way whats wrong. Chuck the bits into google and see what it says.

$$anonymous$$ake sure your Android SD$$anonymous$$ is properly installed including the build tools and platform tools. Its also requires proper setup of Java.

https://www.google.co.uk/search?q=unity+java+setup&ie=utf-8&oe=utf-8&client=ubuntu&channel=fs&gfe_rd=cr&ei=NV3nWIaRB6TP8AfEpayAAQ

avatar image SohailBukhari · Apr 07, 2017 at 09:49 AM 0
Share

You have to set the android sdk path and jdk path to environmental variables. $$anonymous$$ay you have not set the new sdk path to your environmental variables. If problem persists then update your sdk and try again.

avatar image GameCash · Apr 07, 2017 at 06:25 PM 0
Share

Thank you @meat5000 i will try that

avatar image GameCash · Apr 07, 2017 at 06:26 PM 0
Share

Thank you too @SohailBukhari i will try that also

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by GameCash · Apr 11, 2017 at 07:07 AM

Figured it out. Had to rename a couple files and also do the enviromental variables. Thanks guys. After I put the jdk bin folder to an enviromental varibale, i then seen that one of the sdk's i had was actually the "tools" folder that unity was complaining about. So i went to my original sdk and deleted the original tools folder and replaced it with my tools folder i had named "ssddkk". so after i replaced that tools folder with ssddkk i renamed ssddkk to just Tools. It worked. can test my game now. Unity confused me with the "platform tools" error when it was just the tools that was a problem, and also sdk's cannot be on the desktop like guy said above me. message me if anyone else had this problem and need pictures..thanks again

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

CommandInvokationFailure: Gradle build failed 0 Answers

Not pushing content to device 0 Answers

Build and Run on Android not working 0 Answers

Getting Error wheni build and run my game, couldn't swtich to requested monitor resolutuon swtiching to 1080x1920 or 1024x768,Help anyone? 0 Answers

Installation fail on build and run 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