- Home /
After upgrade Unity 5 build error
Hi, I have upgraded Unity 5 in my project. I can't build apk file. Here logs below:
CommandInvokationFailure: Failed to build apk. See the Console for details. C:\Program Files\Java\jdk1.8.0_05\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/Abdullah/Desktop/Android-SDK/android-sdk\tools" -Dfile.encoding=UTF8 -jar "C:/Program Files/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar" -
stderr[ Error: Not a file 'C:\Users\Abdullah\Documents\Grab101_Android' ] stdout[
] UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.AndroidSDKTools.RunCommand (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.HostView:OnGUI()
Answer by asayman · Mar 11, 2015 at 01:28 PM
I believe that real problem begins from stderr section:
stderr[ Error: Not a file 'C:\Users\Abdullah\Documents\Grab101_Android' ]
It says it's not a file so do you add .apk to file name for your build? Most programs automatically adds file extension (.apk for this instance) when saving a file but there may be a bug or error on your build or etc. So if you have a folder named Grab101_Android at the same path (Documents) at your target and your file name is Grab101_Android; there should a problem. (Grab101_Android should be your project folder of Unity right?)
Can you try adding apk extension to your build file: Grab101_Android.apk? Or try a different name.
Your answer