Error when packaging Android apk

When packaging my game for Android, I receive the error below. I have no clue where to look for a solution, hopefully someone can help me out.

MainFrameActions: Packaging (Android (ETC2)): ====11-8-2016 11:48:49====PERFORMING FINAL APK PACKAGE OPERATION================================================
MainFrameActions: Packaging (Android (ETC2)): UEDeployAndroid.RunCommandLineProgramAndReturnError: Making .apk with Ant… (note: it’s safe to ignore javac obsolete warnings)
MainFrameActions: Packaging (Android (ETC2)): Buildfile: build.xml does not exist!
MainFrameActions: Packaging (Android (ETC2)): Build failed
MainFrameActions: Packaging (Android (ETC2)): UEDeployAndroid.RunCommandLineProgramAndReturnError: Making .apk with Ant again to show errors
MainFrameActions: Packaging (Android (ETC2)): Buildfile: build.xml does not exist!
MainFrameActions: Packaging (Android (ETC2)): Build failed
MainFrameActions: Packaging (Android (ETC2)): Program.Main: ERROR: AutomationTool terminated with exception: System.IO.DirectoryNotFoundException: Could not find a part of the path ‘D:\Werkbestanden\Unreal\Def\Def\Intermediate/Android/APK/bin/Def-debug.apk’.
MainFrameActions: Packaging (Android (ETC2)): at System.IO.__Error.WinIOError(Int32 e
MainFrameActions: Packaging (Android (ETC2)): rrorCode, String maybeFullPath)
MainFrameActions: Packaging (Android (ETC2)): at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
MainFrameActions: Packaging (Android (ETC2)): at UnrealBuildTool.UEDeployAndroid.MakeApk(AndroidToolChain ToolChain, String ProjectName, String ProjectDirectory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bMakeSeparateApks, Boolean bIncrementalPackage, Boolean bDisallowPackagingDataInApk)
MainFrameActions: Packaging (Android (ETC2)): at UnrealBuildTool.UEDeployAndroid.PrepForUATPackageOrDeploy(FileReference ProjectFile, String ProjectName, String ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bIsDataDeploy)
MainFrameActions: Packaging (Android (ETC2)): at AndroidPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL)
MainFrameActions: Packaging (Android (ETC2)): at Project.Package(ProjectParams Params, Int32 WorkingCL)
MainFrameActions: Packaging (Android (ETC2)): at BuildCookRun.DoBuildCookRun(ProjectParams Params)
MainFrameActions: Packaging (Android (ETC2)): at AutomationTool.BuildCommand.Execute()
MainFrameActions: Packaging (Android (ETC2)): at AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands)
MainFrameActions: Packaging (Android (ETC2)): at AutomationTool.Automation.Process(String[] CommandLine)
MainFrameActions: Packaging (Android (ETC2)): at AutomationTool.Program.MainProc(Object Param)
MainFrameActions: Packaging (Android (ETC2)): at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
MainFrameActions: Packaging (Android (ETC2)): at AutomationTool.Program.Main()
MainFrameActions: Packaging (Android (ETC2)): Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)
MainFrameActions: Packaging (Android (ETC2)): Domain_ProcessExit
MainFrameActions: Packaging (Android (ETC2)): copying UAT log files…
MainFrameActions: Packaging (Android (ETC2)): BUILD FAILED
PackagingResults:Error: Error Unknown Error

Hello ,

It seems that the issue could be related to how you have your Android paths set up. This is the message that hints to that:

ERROR: AutomationTool terminated with exception: System.IO.DirectoryNotFoundException: Could not find a part of the path ‘D:\Werkbestanden\Unreal\Def\Def\Intermediate/Android/APK/bin/Def-debug.apk’.

Could you check your paths and also upload the full log for this failed packaging attempt? There could be messages elsewhere in the log. If you’re not sure if your Android paths are set up correctly, feel free to upload a screenshot of the Project Settings > Android SDK window.

We haven’t heard from you in a while, . Are you still experiencing this issue? If so, was my last comment of any help? In the meantime, I’ll be marking this issue as resolved for tracking purposes.

Sorry, it seems I didn’t save my answer correctly, below a capture of the paths and full error text.

103064-capture.jpg

link text

It looks like the main error here is:

ERROR: SWT folder 'lib\x86_64' does not exist.

From looking this one up online, it seems to be related to the SDK installation itself. This seems to have helped with this issue. Please let me know if it is able to help:

http:///questions/18662199/error-swt-folder-does-not-exist-please-set-android-swt-a-get-this-error

Thanks for looking into to log file; I tried the solutions in the mentioned forum, but still I got errors on the ANDROID_SWT path. In the end I resolved the problem by setting the swt_path in full in the android.bat file. (set swt_path=C:\android-sdk-windows\tools\lib\x86_64)