Android "Launch" fails on Windows 8. Testing with Nexus 7. "Output Window" also causes the whole editor to freeze, after the error is thrown

Hello,

I am having trouble launching or packaging my project to Android. I am running Windows 8.1 and UE 4.7.2 on an Asus N550JV with an NVIDIA® GeForce® GT 750M with 2GB/4GB DDR3 VRAM video card. I have seen others have had similar issues, however, I tried to launch the editor as an administrator as was suggested, but the problem still persists.

Error: d:/Program Files/Android/ndk/ndk-build.cmd failed with args APP_ABI="armeabi-v7a " NDK_DEBUG=1

I have not used the nVidia TDAP, because I already had the Android SDK, JDK installed. I downloaded the latest NDK and Apache Ant. I am using a Nexus 7 (2013) Tablet with Lollipop installed.

Relevant log part:

====PREPARING NATIVE CODE================================================================= [2015.03.07-23.11.40:772][496]LogPlayLevel: UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Preparing native code for debugging... [2015.03.07-23.11.40:817][499]LogPlayLevel: BuildCommand.Execute: ERROR: BUILD FAILED [2015.03.07-23.11.42:942][587]LogPlayLevel: Program.Main: ERROR: AutomationTool terminated with exception: [2015.03.07-23.11.42:942][587]LogPlayLevel: Program.Main: ERROR: Exception in UnrealBuildTool: ERROR: d:/Program Files/Android/ndk/ndk-build.cmd failed with args APP_ABI="armeabi-v7a " NDK_DEBUG=1 [2015.03.07-23.11.42:942][587]LogPlayLevel: Stacktrace:    at UnrealBuildTool.Android.UEDeployAndroid.RunCommandLineProgramAndThrowOnError(String WorkingDirectory, String Command, String Params, String OverrideDesc, Boolean bUseShellExecute) [2015.03.07-23.11.42:942][587]LogPlayLevel: at UnrealBuildTool.Android.UEDeployAndroid.MakeApk(String ProjectName, String ProjectDirectory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bMakeSeparateApks, Boolean bIncrementalPackage, Boolean bDisallowPackagingDataInApk) [2015.03.07-23.11.42:942][587]LogPlayLevel: at UnrealBuildTool.Android.UEDeployAndroid.PrepForUATPackageOrDeploy(String ProjectName, String ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bIsDataDeploy) [2015.03.07-23.11.42:942][587]LogPlayLevel: at AndroidPlatform.Deploy(ProjectParams Params, DeploymentContext SC) [2015.03.07-23.11.42:942][587]LogPlayLevel: at Project.Deploy(ProjectParams Params) [2015.03.07-23.11.42:943][587]LogPlayLevel: at BuildCookRun.DoBuildCookRun(ProjectParams Params) [2015.03.07-23.11.42:943][587]LogPlayLevel: at Build

Furthermore, in my experience the Editor is quite unstable. Each time I use the Android “Launch” option, if I choose “Show Ouput”, I only have a few seconds after the error before I can close the output window. Otherwise, the whole editor will freeze and needs to be closed by the task manager.
Moreover, It sometimes freezes while working with blueprints - e.g.: when trying to connect an array to a for each loop, deleting an asset etc(however, these events didn’t happen as often).

EDIT: Also tried to push the app to my One plus One. I get the same error.

I just ran into this one and it looks like it’s because the path to the Android NDK has spaces in it. Running NDK directly from the command prompt yielded:

ERROR: NDK path cannot contain any
spaces!

Thank you! That was the issue, I moved the NDK and then it worked. I did get another error regarding an ANT version afterwards though, during which my editor froze again(while I was looking at the ouput window). However, I solved that as well and the app is now pushed on the device. Although it does crash on startup, so it seems now I have a new problem.

I, too, am experiencing a crash on launch. It’s a segmentation fault in the UE4 library – I’ll probably spend all of today troubleshooting it.

I am not sure if this is the best place to discuss this, but I had a problem where the “Android Package Name” had a different project name than the UE4 project, which caused a segmentation fault due to the ICU data directory not being discovered: Android app crashes on startup: "ICU data directory was not discovered" - Mobile - Epic Developer Community Forums

This is perfect! That was exactly my issue. I added “.[Project]” into the setting for the project package and it worked fine. According to the tooltip, “[Project]” automatically gets replaced with the UE4 project name.