Launch and Package Fail for C++ Android Projects in 4.15.1

I am using binary Installer version of 4.15.1 on windows 10. All attempts to launch or package C++ android projects fail in error messages. The same code was working fine in 4.14, this has nothing to do with my code. I get the same errors with standard ue4 templates

What Works:

  1. Create Blueprint 4.15.1 Third Person Project from launcher
  2. From editor Launch menu select device.
  3. Successfully runs on device

What Fails:

  1. Create C++ 4.15.1 Third Person Project from launcher
  2. From editor Launch menu select device.
  3. Fails with following log file.

LogPlayLevel: Completed Launch On Stage: Cooking in the editor, Time: 6.005055
LogPlayLevel: Running AutomationTool...
LogPlayLevel: Automation.ParseCommandLine: Parsing command line: -ScriptsForProject=C:/UEProjects/MobileTest5/MobileTest5.uproject BuildCookRun -project=C:/UEProjects/MobileTest5/MobileTest5.uproject -noP4 -clientconfig=Development -serverconfig=Development -nocompile -nocompileeditor -installed -ue4exe=UE4Editor-Cmd.exe -utf8output -platform=Android_ASTC -t
argetplatform=Android -cookflavor=ASTC -build -map=/Game/ThirdPersonCPP/Maps/ThirdPersonExampleMap -skipcook -CookInEditor -iterativecooking -compressed -iterativedeploy -stage -deploy -cmdline="/Game/ThirdPersonCPP/Maps/ThirdPersonExampleMap -Messaging" -device=Android_ASTC@0424916012427008a655 -addcmdline="-SessionId=F71D233645341838FC2A91983D56C03A -Sessi
onOwner='normal' -SessionName='Launch On Device' " -run
LogPlayLevel: Automation.Process: Setting up command environment.
LogPlayLevel: BuildCookRun.SetupParams: Setting up ProjectParams for C:\UEProjects\MobileTest5\MobileTest5.uproject
LogPlayLevel: Project.Build: ********** BUILD COMMAND STARTED **********
LogPlayLevel: Completed Launch On Stage: Build Task, Time: 1.317873
LogPlayLevel: CommandUtils.Run: Run: C:\Program Files\Unreal Engine\UE_4.15\Engine\Binaries\DotNET\UnrealBuildTool.exe MobileTest5 Android Development -Project=C:\UEProjects\MobileTest5\MobileTest5.uproject  C:\UEProjects\MobileTest5\MobileTest5.uproject  -remoteini="C:\UEProjects\MobileTest5" -noxge -generatemanifest -NoHotReload
LogPlayLevel: UnrealBuildTool: Performing full C++ include scan (building a new target)
LogPlayLevel: UnrealBuildTool: NDK version: 21, GccVersion: 4.9
LogPlayLevel: CommandUtils.Run: Run: Took 1.0897215s to run UnrealBuildTool.exe, ExitCode=0
LogPlayLevel: CommandUtils.Run: Run: C:\Program Files\Unreal Engine\UE_4.15\Engine\Binaries\DotNET\UnrealBuildTool.exe MobileTest5 Android Development -Project=C:\UEProjects\MobileTest5\MobileTest5.uproject  C:\UEProjects\MobileTest5\MobileTest5.uproject  -remoteini="C:\UEProjects\MobileTest5" -noxge -NoHotReload -ignorejunk
LogPlayLevel: UnrealBuildTool: Creating makefile for MobileTest5 (no existing makefile)
LogPlayLevel: UnrealBuildTool: Performing full C++ include scan (no include cache file)
LogPlayLevel: UnrealBuildTool: NDK version: 21, GccVersion: 4.9
LogPlayLevel: UnrealBuildTool: Parsing headers for MobileTest5
LogPlayLevel: UnrealBuildTool:   Running UnrealHeaderTool "C:\UEProjects\MobileTest5\MobileTest5.uproject" "C:\UEProjects\MobileTest5\Intermediate\Build\Android\MobileTest5\Development\MobileTest5.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
LogPlayLevel: UnrealBuildTool: Reflection code generated for MobileTest5 in 7.3437584 seconds
LogPlayLevel: UnrealBuildTool: Compiling Native code with NDK API 'android-21'
LogPlayLevel: UnrealBuildTool: Performing 8 actions (4 in parallel)
LogPlayLevel: UnrealBuildTool: [1/8] clang++.exe PCH.MobileTest5.h [armv7-es2]
LogPlayLevel: UnrealBuildTool: [2/8] clang++.exe PCH.UELinkerFixups.h [armv7-es2]
LogPlayLevel: UnrealBuildTool: [3/8] clang++.exe UELinkerFixups.cpp [armv7-es2]
LogPlayLevel: UnrealBuildTool: [4/8] clang++.exe MobileTest5.cpp [armv7-es2]
LogPlayLevel: UnrealBuildTool: [5/8] clang++.exe MobileTest5Character.cpp [armv7-es2]
LogPlayLevel: UnrealBuildTool: [6/8] clang++.exe MobileTest5GameMode.cpp [armv7-es2]
LogPlayLevel: UnrealBuildTool: [7/8] clang++.exe MobileTest5.generated.cpp [armv7-es2]
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: This application has requested the Runtime to terminate it in an unusual way.
LogPlayLevel: UnrealBuildTool: Please contact the application's support team for more information.
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: This application has requested the Runtime to terminate it in an unusual way.
LogPlayLevel: UnrealBuildTool: Please contact the application's support team for more information.
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: This application has requested the Runtime to terminate it in an unusual way.
LogPlayLevel: UnrealBuildTool: Please contact the application's support team for more information.
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: This application has requested the Runtime to terminate it in an unusual way.
LogPlayLevel: UnrealBuildTool: Please contact the application's support team for more information.
LogPlayLevel: UnrealBuildTool: Assertion failed!
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: Program: C:\nvpack\android-ndk-r10e\toolchains\llvm-3.6\prebuilt\windows-x86_64\bin\clang++.exe
LogPlayLevel: UnrealBuildTool: File: /s/ndk-toolchain/src/llvm-3.6/llvm/tools/clang/lib/AST/DeclBase.cpp, Line 1299
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: Expression: DeclKind != Decl::LinkageSpec && "Should not perform lookups into linkage specs!"
LogPlayLevel: UnrealBuildTool: clang++.exe: error: clang frontend command failed with exit code 3 (use -v to see invocation)
LogPlayLevel: UnrealBuildTool: clang version 3.6
LogPlayLevel: UnrealBuildTool: Target: armv7-none-linux-androideabi
LogPlayLevel: UnrealBuildTool: Thread model: posix
LogPlayLevel: UnrealBuildTool: clang++.exe: note: diagnostic msg: PLEASE submit a bug report to http://source.android.com/source/report-bugs.html and include the crash backtrace, preprocessed source, and associated run script.
LogPlayLevel: UnrealBuildTool: clang++.exe: note: diagnostic msg:
LogPlayLevel: UnrealBuildTool: ********************
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
LogPlayLevel: UnrealBuildTool: Preprocessed source(s) and associated run script(s) are located at:
LogPlayLevel: UnrealBuildTool: clang++.exe: note: diagnostic msg: C:\Users\normal\AppData\Local\Temp\MobileTest5-470b09.cpp
LogPlayLevel: UnrealBuildTool: clang++.exe: note: diagnostic msg: C:\Users\normal\AppData\Local\Temp\MobileTest5-470b09.sh
LogPlayLevel: UnrealBuildTool: clang++.exe: note: diagnostic msg:
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: ********************
LogPlayLevel: UnrealBuildTool: Assertion failed!
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: Program: C:\nvpack\android-ndk-r10e\toolchains\llvm-3.6\prebuilt\windows-x86_64\bin\clang++.exe
LogPlayLevel: UnrealBuildTool: File: /s/ndk-toolchain/src/llvm-3.6/llvm/tools/clang/lib/AST/DeclBase.cpp, Line 1299
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: Expression: DeclKind != Decl::LinkageSpec && "Should not perform lookups into linkage specs!"
LogPlayLevel: UnrealBuildTool: Assertion failed!
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: Program: C:\nvpack\android-ndk-r10e\toolchains\llvm-3.6\prebuilt\windows-x86_64\bin\clang++.exe
LogPlayLevel: UnrealBuildTool: File: /s/ndk-toolchain/src/llvm-3.6/llvm/tools/clang/lib/AST/DeclBase.cpp, Line 1299
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: Expression: DeclKind != Decl::LinkageSpec && "Should not perform lookups into linkage specs!"
LogPlayLevel: UnrealBuildTool: clang++.exe: error: clang frontend command failed with exit code 3 (use -v to see invocation)
LogPlayLevel: UnrealBuildTool: clang version 3.6
LogPlayLevel: UnrealBuildTool: Target: armv7-none-linux-androideabi
LogPlayLevel: UnrealBuildTool: Thread model: posix
LogPlayLevel: UnrealBuildTool: clang++.exe: note: diagnostic msg: PLEASE submit a bug report to http://source.android.com/source/report-bugs.html and include the crash backtrace, preprocessed source, and associated run script.
LogPlayLevel: UnrealBuildTool: clang++.exe: error: clang frontend command failed with exit code 3 (use -v to see invocation)
LogPlayLevel: UnrealBuildTool: clang version 3.6
LogPlayLevel: UnrealBuildTool: Target: armv7-none-linux-androideabi
LogPlayLevel: UnrealBuildTool: Thread model: posix
LogPlayLevel: UnrealBuildTool: clang++.exe: note: diagnostic msg: PLEASE submit a bug report to http://source.android.com/source/report-bugs.html and include the crash backtrace, preprocessed source, and associated run script.
LogPlayLevel: UnrealBuildTool: Assertion failed!
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: Program: C:\nvpack\android-ndk-r10e\toolchains\llvm-3.6\prebuilt\windows-x86_64\bin\clang++.exe
LogPlayLevel: UnrealBuildTool: File: /s/ndk-toolchain/src/llvm-3.6/llvm/tools/clang/lib/AST/DeclBase.cpp, Line 1299
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: Expression: DeclKind != Decl::LinkageSpec && "Should not perform lookups into linkage specs!"
LogPlayLevel: UnrealBuildTool: clang++.exe: error: clang frontend command failed with exit code 3 (use -v to see invocation)
LogPlayLevel: UnrealBuildTool: clang version 3.6
LogPlayLevel: UnrealBuildTool: Target: armv7-none-linux-androideabi
LogPlayLevel: UnrealBuildTool: Thread model: posix
LogPlayLevel: UnrealBuildTool: clang++.exe: note: diagnostic msg: PLEASE submit a bug report to http://source.android.com/source/report-bugs.html and include the crash backtrace, preprocessed source, and associated run script.
LogPlayLevel: UnrealBuildTool: clang++.exe: note: diagnostic msg:
LogPlayLevel: UnrealBuildTool: ********************
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
LogPlayLevel: UnrealBuildTool: Preprocessed source(s) and associated run script(s) are located at:
LogPlayLevel: UnrealBuildTool: clang++.exe: note: diagnostic msg: C:\Users\normal\AppData\Local\Temp\MobileTest5-1fe662.cpp
LogPlayLevel: UnrealBuildTool: clang++.exe: note: diagnostic msg: C:\Users\normal\AppData\Local\Temp\MobileTest5-1fe662.sh
LogPlayLevel: UnrealBuildTool: clang++.exe: note: diagnostic msg:
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: ********************
LogPlayLevel: UnrealBuildTool: clang++.exe: note: diagnostic msg:
LogPlayLevel: UnrealBuildTool: ********************
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
LogPlayLevel: UnrealBuildTool: Preprocessed source(s) and associated run script(s) are located at:
LogPlayLevel: UnrealBuildTool: clang++.exe: note: diagnostic msg: C:\Users\normal\AppData\Local\Temp\MobileTest5Character-d91498.cpp
LogPlayLevel: UnrealBuildTool: clang++.exe: note: diagnostic msg: C:\Users\normal\AppData\Local\Temp\MobileTest5Character-d91498.sh
LogPlayLevel: UnrealBuildTool: clang++.exe: note: diagnostic msg:
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: ********************
LogPlayLevel: UnrealBuildTool: clang++.exe: note: diagnostic msg:
LogPlayLevel: UnrealBuildTool: ********************
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
LogPlayLevel: UnrealBuildTool: Preprocessed source(s) and associated run script(s) are located at:
LogPlayLevel: UnrealBuildTool: clang++.exe: note: diagnostic msg: C:\Users\normal\AppData\Local\Temp\MobileTest5GameMode-f9c9c7.cpp
LogPlayLevel: UnrealBuildTool: clang++.exe: note: diagnostic msg: C:\Users\normal\AppData\Local\Temp\MobileTest5GameMode-f9c9c7.sh
LogPlayLevel: UnrealBuildTool: clang++.exe: note: diagnostic msg:
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: ********************
LogPlayLevel: UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: C:\UEProjects\MobileTest5\Binaries\Android\MobileTest5-armv7-es2.so
LogPlayLevel: UnrealBuildTool: Total build time: 42.01 seconds (Local executor: 0.00 seconds)
LogPlayLevel: CommandUtils.Run: Run: Took 42.3403137s to run UnrealBuildTool.exe, ExitCode=5
LogPlayLevel: Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): C:\Program Files\Unreal Engine\UE_4.15\Engine\Binaries\DotNET\UnrealBuildTool.exe MobileTest5 Android Development -Project=C:\UEProjects\MobileTest5\MobileTest5.uproject  C:\UEProjects\MobileTest5\MobileT
est5.uproject  -remoteini="C:\UEProjects\MobileTest5" -noxge -NoHotReload -ignorejunk. See logfile for details: 'UnrealBuildTool-2017.03.22-03.21.37.txt'
LogPlayLevel:    at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
LogPlayLevel:    at AutomationTool.CommandUtils.RunAndLog(CommandEnvironment Env, String App, String CommandLine, String LogName, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
LogPlayLevel:    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary`2 EnvVars)
LogPlayLevel:    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, FileReference Project, String Target, String Platform, String Config, String AdditionalArgs, String LogName, Dictionary`2 EnvVars)
LogPlayLevel:    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, Dictionary`2 EnvVars)
LogPlayLevel:    at AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable`1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary`2 PlatformEnvVars, Nullable`1 InChangelistNumberOverride, Dictionary`2 InTargetToManifest)
LogPlayLevel:    at Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask)
LogPlayLevel:    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
LogPlayLevel:    at BuildCookRun.ExecuteBuild()
LogPlayLevel:    at AutomationTool.BuildCommand.Execute()
LogPlayLevel:    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
LogPlayLevel:    at AutomationTool.Automation.Process(String[] Arguments)
LogPlayLevel:    at AutomationTool.Program.MainProc(Object Param)
LogPlayLevel:    at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
LogPlayLevel:    at AutomationTool.Program.Main()
LogPlayLevel: Program.Main: AutomationTool exiting with ExitCode=5 (5)
LogPlayLevel: Completed Launch On Stage: Build Task, Time: 43.034263
LogPlayLevel: BUILD FAILED
PackagingResults:Error: Error Launch failed! Unknown Error

I can compile and run the project on the PC. This error is specific to Packaging and Launching C++ android projects. Oddly Blueprint android projects are working fine.

It turns out I needed to update CodeWorks for this to work. It seems the 4.15 requires the latest updates. I ran c:\nvpack\Chooser.exe and selected the standard install of CodeWorks 1R6.

Everything is working now.

If you don’t have CodeWorks you can find the installer in Engine\Extras\AndroidWorks\Win64
or get the latest one directly from nvidia like I did.