Download

Error on creating Android Package

Hello,

I’ve a c++ project and i’m trying to package it to Android devices.
I have already installed the NVPACK on my C: and i have the project files and the Unreal installed on my D:
I’m running the Unreal 4.12.5

The package process stop with the following error:
MainFrameActions: Packaging (Android (All)): Running AutomationTool…
MainFrameActions: Packaging (Android (All)): Automation.ParseCommandLine: Parsing command line: -ScriptsForProject=D:/projetos_unreal/TowerDefense/TowerDefense.uproject BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=D:/projetos_unreal/TowerDefense/TowerDefense.uproject -cook -stag
MainFrameActions: Packaging (Android (All)): e -archive -archivedirectory=D:/Meus documentos/Desktop/build -package -clientconfig=Development -ue4exe=UE4Editor-Cmd.exe -pak -prereqs -nodebuginfo -targetplatform=Android -build -CrashReporter -utf8output
MainFrameActions: Packaging (Android (All)): Automation.Process: Setting up command environment.
MainFrameActions: Packaging (Android (All)): BuildCookRun.SetupParams: Setting up ProjectParams for D:\projetos_unreal\TowerDefense\TowerDefense.uproject
MainFrameActions: Packaging (Android (All)): Project.Build: ********** BUILD COMMAND STARTED **********
MainFrameActions: Packaging (Android (All)): CommandUtils.Run: Run: D:\Program Files\Epic Games\4.12\Engine\Binaries\DotNET\UnrealBuildTool.exe TowerDefense Android Development -Project=D:\projetos_unreal\TowerDefense\TowerDefense.uproject D:\projetos_unreal\TowerDefense\TowerDefense.uproject -remo
MainFrameActions: Packaging (Android (All)): teini=“D:\projetos_unreal\TowerDefense” -noxge -generatemanifest -NoHotReloadFromIDE
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: Performing full C++ include scan (building a new target)
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: NDK version: 19, GccVersion: 4.9
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: building WITHOUT VULKAN define
MainFrameActions: Packaging (Android (All)): CommandUtils.Run: Run: Took 1.2425494s to run UnrealBuildTool.exe, ExitCode=0
MainFrameActions: Packaging (Android (All)): CommandUtils.Run: Run: D:\Program Files\Epic Games\4.12\Engine\Binaries\DotNET\UnrealBuildTool.exe TowerDefense Android Development -Project=D:\projetos_unreal\TowerDefense\TowerDefense.uproject D:\projetos_unreal\TowerDefense\TowerDefense.uproject -remoteini=“D:\projetos_unreal\TowerDefense” -noxge -NoHotReload
FromIDE -ignorejunk
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: Target is up to date
MainFrameActions: Packaging (Android (All)): CommandUtils.Run: Run: Took 1.6398449s to run UnrealBuildTool.exe, ExitCode=0
MainFrameActions: Packaging (Android (All)): CommandUtils.Run: Run: D:\Program Files\Epic Games\4.12\Engine\Binaries\DotNET\UnrealBuildTool.exe TowerDefense Android Development -prepfordeploy -project=“D:\projetos_unreal\TowerDefense\TowerDefense.uproject” -NoHotReloadFromIDE -ignorejunk
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: NDK version: 19, GccVersion: 4.9
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: building WITHOUT VULKAN define
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: Receipt Filename: D:\projetos_unreal\TowerDefense\Binaries\Android\TowerDefense.target
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: AndroidPlugin: Plugins\Runtime\GearVR\Source\GearVR\GearVR_APL.xml
MainFrameActions: Packaging (Android (All)): UnrealBuildTool:
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: APL: …\Plugins/Runtime/GearVR/Source/GearVR/GearVR_APL.xml
MainFrameActions: Packaging (Android (All)): UnrealBuildTool:
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: ====8/29/2016 6:51:11 PM====PREPARING TO MAKE APK=================================================================
MainFrameActions: Packaging (Android (All)): UnrealBuildTool:
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: ==== Writing to shim file D:\projetos_unreal\TowerDefense\Build\Android\src\com\epicgames\ue4\DownloadShim.java ====
MainFrameActions: Packaging (Android (All)): UnrealBuildTool:
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: ==== Shim data file up to date so not writing. ====
MainFrameActions: Packaging (Android (All)): UnrealBuildTool:
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: ==== Writing to template target file D:\projetos_unreal\TowerDefense\Build\Android\src\com\YourCompany\TowerDefense\AlarmReceiver.java ====
MainFrameActions: Packaging (Android (All)): UnrealBuildTool:
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: ==== Template target file up to date so not writing. ====
MainFrameActions: Packaging (Android (All)): UnrealBuildTool:
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: ==== Writing to template target file D:\projetos_unreal\TowerDefense\Build\Android\src\com\YourCompany\TowerDefense\DownloaderActivity.java ====
MainFrameActions: Packaging (Android (All)): UnrealBuildTool:
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: ==== Template target file up to date so not writing. ====
MainFrameActions: Packaging (Android (All)): UnrealBuildTool:
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: ==== Writing to template target file D:\projetos_unreal\TowerDefense\Build\Android\src\com\YourCompany\TowerDefense\OBBDownloaderService.java ====
MainFrameActions: Packaging (Android (All)): UnrealBuildTool:
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: ==== Template target file up to date so not writing. ====
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: Cleaning up files based on template dir D:\projetos_unreal\TowerDefense\Build\Android\src\com\YourCompany\TowerDefense
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: Building Java with SDK API level ‘android-19’
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: D:\projetos_unreal\TowerDefense\Binaries\Android\TowerDefense-armv7-es2.apk is out of date due to newer input file D:\projetos_unreal\TowerDefense\Binaries\Android\TowerDefense-armv7-es2.so
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: APL Init: armeabi-v7a
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: GearVR init
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: Oculus Signature Files (osig) will be removed from APK
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: bPackageDataInsideApk = True
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: Obb location D:\projetos_unreal\TowerDefense/Saved/StagedBuilds/Android.obb
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: Obb destination location D:\projetos_unreal\TowerDefense\Intermediate/Android/APK/assets
MainFrameActions: Packaging (Android (All)): UnrealBuildTool:
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: ====8/29/2016 6:51:13 PM====PREPARING NATIVE CODE=================================================================
MainFrameActions: Packaging (Android (All)): UnrealBuildTool:
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: ====8/29/2016 6:51:13 PM====UPDATING BUILD CONFIGURATION FILES====================================================
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: UnrealBuildTool Exception: System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: at UnrealBuildTool.UEDeployAndroid.RunCommandLineProgramAndThrowOnError(String WorkingDirectory, String Command, String Params, String OverrideDesc, Boolean bUseShellExecute)
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: at UnrealBuildTool.UEDeployAndroid.UpdateProjectProperties(AndroidToolChain ToolChain, String UE4BuildPath, String ProjectName)
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: at UnrealBuildTool.UEDeployAndroid.MakeApk(AndroidToolChain ToolChain, String ProjectName, String ProjectDirectory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bMakeSeparateApks, Boole
MainFrameActions: Packaging (Android (All)): an bIncrementalPackage, Boolean bDisallowPackagingDataInApk)
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: at UnrealBuildTool.UEDeployAndroid.PrepTargetForDeployment(UEBuildTarget InTarget)
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: at UnrealBuildTool.UnrealBuildTool.DoPostStartupStuffThatCanAccessConfigs(String] Arguments)
MainFrameActions: Packaging (Android (All)): CommandUtils.Run: Run: Took 2.7195375s to run UnrealBuildTool.exe, ExitCode=5
MainFrameActions: Packaging (Android (All)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.AutomationException: Command failed (Result:5): D:\Program Files\Epic Games\4.12\Engine\Binaries\DotNET\UnrealBuildTool.exe TowerDefense Android Development -prepfordeploy -proje
MainFrameActions: Packaging (Android (All)): ct=“D:\projetos_unreal\TowerDefense\TowerDefense.uproject” -NoHotReloadFromIDE -ignorejunk. See logfile for details: ‘UnrealBuildTool-2016.08.29-18.51.10.txt’
MainFrameActions: Packaging (Android (All)): at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary2 EnvVars) MainFrameActions: Packaging (Android (All)): at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary2 EnvVars)
MainFrameActions: Packaging (Android (All)): at AndroidPlatform.PostBuildTarget(UE4Build Build, FileReference UProjectPath, String TargetName, String Config)
MainFrameActions: Packaging (Android (All)): at AutomationTool.UE4Build.BuildWithUBT(String TargetName, UnrealTargetPlatform TargetPlatform, String Config, FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity, Dictionary2 EnvVars ) MainFrameActions: Packaging (Android (All)): at AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary2 PlatformEnvVars, Nullable1 InChangelistNumberOverride, Di
ctionary2 InTargetToManifest) MainFrameActions: Packaging (Android (All)): at Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask) MainFrameActions: Packaging (Android (All)): at BuildCookRun.DoBuildCookRun(ProjectParams Params) MainFrameActions: Packaging (Android (All)): at AutomationTool.BuildCommand.Execute() MainFrameActions: Packaging (Android (All)): at AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands) MainFrameActions: Packaging (Android (All)): at AutomationTool.Automation.Process(String] CommandLine) MainFrameActions: Packaging (Android (All)): at AutomationTool.Program.MainProc(Object Param) MainFrameActions: Packaging (Android (All)): at AutomationTool.InternalUtils.RunSingleInstance(Func2 Main, Object Param)
MainFrameActions: Packaging (Android (All)): at AutomationTool.Program.Main()
MainFrameActions: Packaging (Android (All)): Program.Main: AutomationTool exiting with ExitCode=5 (5)
MainFrameActions: Packaging (Android (All)): Domain_ProcessExit
MainFrameActions: Packaging (Android (All)): copying UAT log files…
MainFrameActions: Packaging (Android (All)): BUILD FAILED
PackagingResults:Error: Error Unknown Error

It’s stops because of this error UnrealBuildTool Exception: System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified. But it don’t make clear which files is this.
On attach i leave the log.
I’m running a Windows 10 64x.

Thanks

Update: I tried to create a new project c++ target on mobile and package it to android and the same error appears.

Update2: I made some updates. Now my project is working in Unreal 4.13 and i’m using NVPACK 1R5.
With this changes the error has change too. As new log attached shows (UnrealBuildTool-2016.09.06-15.27.24.txt)

Take a printscreen from path’s of your SDK and of your settings in Project Settings.
Have you error when build whithout C++ project?

This looks like it failed to find android.bat on your system. Do you have ANDROID_HOME environment variable set?

Sorry to delay to answer. Yeah i have ANDROID_HOME set to the nvpack sdk.
android_Home.png

Here is the pictures:
SDK location and my project location:
2087f603481a303179558f2f827a8b272f3e5c9c.png

Path set on project:
sdk on project.png

About getting an error when builld without c++ project. I tried to create a new blueprint project from the given exemples and build it to an Android device, i got the same error

Update2: I made some updates. Now my project is working in Unreal 4.13 and i’m using NVPACK 1R5.
With this changes the error has change too. As new log attached shows (UnrealBuildTool-2016.09.06-15.27.24.txt)

My friend try set SDK API LEVEL and NDK API LEVEL to android-21.
GVRQS_Android_SDK_Options_00.jpg

Click the Project tab. From there you can see a dropdown. Click the dropdown and go to Packages and then you can see the layout folder. From there you can create another Blank Activity.

Did anyone solve the problem?

The problem is that UE can’t find the android.bat file in the Android SDK folder. It’s in a different place. I downloaded the latest NVPACK (1R7) from here: NVIDIA CodeWorks for Android | NVIDIA Developer

And this works fine with UE 4.17. You need to register for their developer program though but that is done quickly.