Hello there!
I started to fix this problem month ago, but don’t fix it by date.
I’ve already read about hundred different questions (like my), but solutions doesn’t work for me. So I decided to write about my problem here.
I’ve created a new blank blueprint project in UE4 without starter content. In the project settings (Android SDK section) I writed locations for sdk, ndk, ant and java. I installed them from websites located here: Android Development Basics for Unreal Engine | Unreal Engine 5.1 Documentation
I set SDK API Level as “matchndk” and NDK API Level as “” (because I want to test my game on device with Android 4.4.2).
When I connect device to PC (“adb devices” command in cmd.exe shows that the device is connected) and launch with “Launch” button, output log shows me next lines:
LogPlayLevel: ====18.04.2015 0:54:55====PREPARING TO MAKE APK=================================================================
LogPlayLevel: Building Java with SDK API level ''
LogPlayLevel: UEDeployAndroid.MakeApk: AndroidManifest.xml that was generated is different than last build, forcing repackage.
LogPlayLevel: UEDeployAndroid.MakeApk: Performing complete package - wiping D:\Programs\HelloAnd\Intermediate/Android/APK, except for predexedLibs
LogPlayLevel: UEDeployAndroid.MakeApk: bPackageDataInsideApk = False
LogPlayLevel: UEDeployAndroid.UpdateProjectProperties:
LogPlayLevel: ====18.04.2015 0:54:56====UPDATING BUILD CONFIGURATION FILES====================================================
LogPlayLevel: ERROR: SWT folder 'lib\x86_64' does not exist.
LogPlayLevel: Please set ANDROID_SWT to point to the folder containing swt.jar for your platform.
LogPlayLevel: UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Updating project.properties, local.properties, and build.xml...
LogPlayLevel: ERROR: SWT folder 'lib\x86_64' does not exist.
LogPlayLevel: Please set ANDROID_SWT to point to the folder containing swt.jar for your platform.
LogPlayLevel: UEDeployAndroid.MakeApk:
LogPlayLevel: ====18.04.2015 0:55:00====PREPARING NATIVE CODE=================================================================
LogPlayLevel: BuildCommand.Execute: ERROR: BUILD FAILED
LogPlayLevel: Program.Main: ERROR: AutomationTool terminated with exception:
LogPlayLevel: Program.Main: ERROR: Exception in mscorlib: Could not find file 'D:\Programs\HelloAnd\Intermediate/Android/APK/libs/armeabi-v7a/libUE4.so'.
LogPlayLevel: Stacktrace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
LogPlayLevel: at System.IO.FileSystemInfo.set_Attributes(FileAttributes value)
LogPlayLevel: at UnrealBuildTool.Android.UEDeployAndroid.MakeApk(String ProjectName, String ProjectDirectory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bMakeSeparateApks, Boolean bIncrementalPackage, Boolean bDisallowPackagingDataInApk)
LogPlayLevel: at UnrealBuildTool.Android.UEDeployAndroid.PrepForUATPackageOrDeploy(String ProjectName, String ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bIsDataDeploy)
LogPlayLevel: at AndroidPlatform.Deploy(ProjectParams Params, DeploymentContext SC)
LogPlayLevel: at Project.Deploy(ProjectParams Params)
LogPlayLevel: at BuildCookRun.DoBuildCookRun(ProjectParams Params)
LogPlayLevel: at BuildCommand.Execute()
LogPlayLevel: at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
LogPlayLevel: at AutomationTool.Automation.Process(String[] CommandLine)
LogPlayLevel: at AutomationTool.Program.MainProc(Object Param)
LogPlayLevel: at AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param)
LogPlayLevel: at AutomationTool.Program.Main()
LogPlayLevel: Program.Main: ERROR: Could not find file 'D:\Programs\HelloAnd\Intermediate/Android/APK/libs/armeabi-v7a/libUE4.so'.
LogPlayLevel: ProcessManager.KillAll: Trying to kill 0 spawned processes.
LogPlayLevel: Program.Main: AutomationTool exiting with ExitCode=1
LogPlayLevel: Domain_ProcessExit
LogPlayLevel: ProcessManager.KillAll: Trying to kill 0 spawned processes.
LogPlayLevel: copying UAT log files...
LogPlayLevel: RunUAT.bat ERROR: AutomationTool was unable to run successfully.
LogPlayLevel: Completed Launch On Stage: Deploy Task, Time: 8.273107
LogPlayLevel: BUILD FAILED
PackagingResults:Error: Error Launch failed! Unknown Error
Please, help me, I’m trying to fix the problem for a long time.
P.S.: sorry for my bad English, I hope that you understant me.