- Home /
Getting error while building a project for android
hey i am trying to build an android apk with unity . i have both java(in c or system drive)and android sdk(in an other drive)downloaded and installed. the error that is raised is:-
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 (x86)\Java\jdk1.8.0\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir="E:/files/android sdk\tools" -Dfile.encoding=UTF8 -jar "E:/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar" -
stderr[ Error:Invalid command android ] stdout[
please help!
Can you post UNITY EDITOR LOGFILE?
Answer by hexagonius · Feb 11, 2015 at 05:06 PM
I know this error from architecture mismatches. Make sure you have Java 32 bit installed, not 64 bit.
If you open a dos command and try to lauch ADB.exe from command line, it runs?
Or return unrecognized command?
Have you checked the path of that ADB.exe in Unity? $$anonymous$$aybe you run 2 Java versions and reference the wrong one
Answer by koolevil · Mar 05, 2017 at 03:26 PM
@ mihirtheboss its too late but still for others who need help Got the same issue, answer is given in the following thread.....
http://stackoverflow.com/questions/42538433/not-finding-android-sdk-unity#
mine solved perfectly, also don't forget to copy zip align from one of the build tools(Android/sdk/buildtools) to the tools(Android/sdk/tools) folder, though newer versions might work without it, but still...!
hope this helps..!!
Your answer
Follow this Question
Related Questions
Cannot build an android game after updating unity. 1 Answer
Unity 2017.3.0f3 / Android SDK Tools incompatibility 0 Answers
Unity project building stuck, need help. 1 Answer
Unity can't detect SDK tools thougt I've installed them! 0 Answers
I am having trouble building the project for android (i can't build) 0 Answers