Search Unity

Android build failure

Discussion in 'Editor & General Support' started by CHOO5D2, Jan 10, 2019.

  1. CHOO5D2

    CHOO5D2

    Joined:
    Jan 3, 2019
    Posts:
    29
    Hi, I encounter building to android failure.

    Not sure what's the problem with it, anyone can point out?


    CommandInvokationFailure: Failed to build apk.
    C:/Program Files/Java/jdk1.8.0_191\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/asus/AppData/Local/Android/Sdk\tools" -Dfile.encoding=UTF8 -jar "D:\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

    stderr[
    Error: Not a file 'D:\Unity Projects\legend of the asassin'
    ]
    stdout[

    ]
    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()
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Try moving your project to a folder that doesn't contain any spaces in its name, then try to build again.
    Let me know if that helped!
     
  3. better_walk_away

    better_walk_away

    Joined:
    Jul 12, 2016
    Posts:
    291
    Try to remove the app in the Android device. I encountered this issue before.