BP Nativization not working for Android packaging

Version: 4.12P3 from Epic Launcher

Trying to package my project for Android with activated BP nativization is failing:

MainFrameActions: Packaging (Android (All)): UnrealBuildTool: A:/Projekte/Unreal Engine 4 Projekte/Pro 4.12/Intermediate/Android/NativizedAssets/Source/NativizedAssets/Private/BP_Pro_PlayerController__pf1228410123.cpp(254,10) :  fatal error: UTF-16 (LE) byte order mark detected in 'A:/Projekte/Unreal Engine 4 Projekte/Pro 4.12/Intermediate/Android/NativizedA
ssets/Source/NativizedAssets/Public\BP_Platform__pf1228410123.h', but encoding is not supported
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: #include "BP_Platform__pf1228410123.h"
MainFrameActions: Packaging (Android (All)): UnrealBuildTool:          ^
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: 1 error generated.
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: [13/22] clang++.exe BP_AI_Controller__pf1228410123.cpp [armv7-es2]
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: 4 warnings generated.
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: [14/22] clang++.exe BP_Background__pf1228410123.cpp [armv7-es2]
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: [15/22] clang++.exe NativizedAssets.generated.cpp [armv7-es2]
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: [16/22] clang++.exe BP_HUD__pf2883341872.cpp [armv7-es2]
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: In file included from A:/Projekte/Unreal Engine 4 Projekte/Pro 4.12/Intermediate/Android/NativizedAssets/Intermediate/Build/Android/UE4/Inc/NativizedAssets/NativizedAssets.generated.cpp:9:
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: A:/Projekte/Unreal Engine 4 Projekte/Pro 4.12/Intermediate/Android/NativizedAssets/Intermediate/Build/Android/UE4/Inc/NativizedAssets/NativizedAssets.generated.dep.h(33,11) :  fatal error: UTF-16 (LE) byte order mark detected in 'A:/Projekte/Unreal Engine 4 Projekte/Pro 4.12/Intermediate/Android/N
ativizedAssets/Source/NativizedAssets\Public/BP_Platform__pf1228410123.h', but encoding is not supported
MainFrameActions: Packaging (Android (All)): UnrealBuildTool:         #include "Public/BP_Platform__pf1228410123.h"
MainFrameActions: Packaging (Android (All)): UnrealBuildTool:                  ^
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: A:/Projekte/Unreal Engine 4 Projekte/Pro 4.12/Intermediate/Android/NativizedAssets/Source/NativizedAssets/Private/BP_HUD__pf2883341872.cpp(262,10) :  fatal error: UTF-16 (LE) byte order mark detected in 'A:/Projekte/Unreal Engine 4 Projekte/Pro 4.12/Intermediate/Android/NativizedAssets/Source/Nati
vizedAssets/Public\BP_Platform__pf1228410123.h', but encoding is not supported
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: #include "BP_Platform__pf1228410123.h"
MainFrameActions: Packaging (Android (All)): UnrealBuildTool:          ^
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: 1 error generated.
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: [17/22] clang++.exe BP_Monster__pf1228410123.cpp [armv7-es2]
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: [18/22] clang++.exe BP_Platform__pf1228410123.cpp [armv7-es2]
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: A:/Projekte/Unreal Engine 4 Projekte/Pro 4.12/Intermediate/Android/NativizedAssets/Source/NativizedAssets/Private/BP_Platform__pf1228410123.cpp(2,10) :  fatal error: UTF-16 (LE) byte order mark detected in 'A:/Projekte/Unreal Engine 4 Projekte/Pro 4.12/Intermediate/Android/NativizedAssets/Source/N
ativizedAssets/Public\BP_Platform__pf1228410123.h', but encoding is not supported
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: #include "BP_Platform__pf1228410123.h"
MainFrameActions: Packaging (Android (All)): UnrealBuildTool:          ^
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: [19/22] clang++.exe BP_ProGameEndless__pf1228410123.cpp [armv7-es2]
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: 1 error generated.
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: [20/22] clang++.exe BP_ProPlayer__pf1228410123.cpp [armv7-es2]
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: A:/Projekte/Unreal Engine 4 Projekte/Pro 4.12/Intermediate/Android/NativizedAssets/Source/NativizedAssets/Private/BP_Monster__pf1228410123.cpp(8,10) :  fatal error: UTF-16 (LE) byte order mark detected in 'A:/Projekte/Unreal Engine 4 Projekte/Pro 4.12/Intermediate/Android/NativizedAssets/Source/Na
tivizedAssets/Public\BP_Platform__pf1228410123.h', but encoding is not supported
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: #include "BP_Platform__pf1228410123.h"
MainFrameActions: Packaging (Android (All)): UnrealBuildTool:          ^
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: A:/Projekte/Unreal Engine 4 Projekte/Pro 4.12/Intermediate/Android/NativizedAssets/Source/NativizedAssets/Private/BP_ProGameEndless__pf1228410123.cpp(192,10) :  fatal error: UTF-16 (LE) byte order mark detected in 'A:/Projekte/Unreal Engine 4 Projekte/Pro 4.12/Intermediate/Android/NativizedAssets/
Source/NativizedAssets/Public\BP_Platform__pf1228410123.h', but encoding is not supported
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: #include "BP_Platform__pf1228410123.h"
MainFrameActions: Packaging (Android (All)): UnrealBuildTool:          ^
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: A:/Projekte/Unreal Engine 4 Projekte/Pro 4.12/Intermediate/Android/NativizedAssets/Source/NativizedAssets/Private/BP_ProPlayer__pf1228410123.cpp(243,10) :  fatal error: UTF-16 (LE) byte order mark detected in 'A:/Projekte/Unreal Engine 4 Projekte/Pro 4.12/Intermediate/Android/NativizedAssets/Sourc
e/NativizedAssets/Public\BP_Platform__pf1228410123.h', but encoding is not supported
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: #include "BP_Platform__pf1228410123.h"
MainFrameActions: Packaging (Android (All)): UnrealBuildTool:          ^
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: 1 error generated.
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: 1 error generated.
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: 1 error generated.
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: 1 error generated.
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: A:\Projekte\Unreal Engine 4 Projekte\Pro 4.12\Intermediate\Android\NativizedAssets\Binaries\Android\UE4-NativizedAssets-armv7-es2.a
MainFrameActions: Packaging (Android (All)): UnrealBuildTool: Total build time: 90,51 seconds
MainFrameActions: Packaging (Android (All)): CommandUtils.Run: Run: Took 90,6447912s to run UnrealBuildTool.exe, ExitCode=5
MainFrameActions: Packaging (Android (All)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.AutomationException: Command failed (Result:5): B:\Epic Games\4.12\Engine\Binaries\DotNET\UnrealBuildTool.exe Pro Android Development -Project="A:\Projekte\Unreal Engine 4 Projekte\Pro 4.12\Pro.uproject"  "A:\Projekte\Unreal Engine 4 Pro
jekte\Pro 4.12\Pro.uproject" -PLUGIN "A:\Projekte\Unreal Engine 4 Projekte\Pro 4.12\Intermediate\Android\NativizedAssets\NativizedAssets.uplugin" -remoteini="A:\Projekte\Unreal Engine 4 Projekte\Pro 4.12" -noxge -NoHotReloadFromIDE -ignorejunk. See logfile for details: 'UnrealBuildTool-2016.05.11-00.49.29.txt' 
MainFrameActions: Packaging (Android (All)):    bei AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars)
MainFrameActions: Packaging (Android (All)):    bei AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary`2 EnvVars)
MainFrameActions: Packaging (Android (All)):    bei 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 EnvVar
s)
MainFrameActions: Packaging (Android (All)):    bei 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, D
ictionary`2 InTargetToManifest)
MainFrameActions: Packaging (Android (All)):    bei Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask)
MainFrameActions: Packaging (Android (All)):    bei BuildCookRun.DoBuildCookRun(ProjectParams Params)
MainFrameActions: Packaging (Android (All)):    
MainFrameActions: Packaging (Android (All)): bei AutomationTool.BuildCommand.Execute()
MainFrameActions: Packaging (Android (All)):    bei AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
MainFrameActions: Packaging (Android (All)):    bei AutomationTool.Automation.Process(String[] CommandLine)
MainFrameActions: Packaging (Android (All)):    bei AutomationTool.Program.MainProc(Object Param)
MainFrameActions: Packaging (Android (All)):    bei AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
MainFrameActions: Packaging (Android (All)):    bei 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

I have NOT added custom C++ code, its auto generated from the engine.

Hello,

Is this occurring when using one of the base templates, such as First Person? I have tried packaging a template with the Nativize option enabled and the packaging process completed successfully.

Could you please provide the full output log?

It works with a blank project and a template project. It also works on my project with Win64 packaging, Android is the only one failing.

Heres the full log:
link text

Here are the steps I took:

  • Created a new blank C++ Project
  • Enabled Nativize Blueprint Assets
  • Packaged for Android (All)

Using this method, the project packaged successfully.

Could you please provide the steps that you are taking when reproducing this issue?

Hello,

I am marking this topic as resolved for tracking purposes, as we have not heard from you in a few days. If this issue persists, feel free to respond to this thread. For any new issues, please create a new Answerhub topic.

Have a great day

Sorry I was occupied with the game jam.

Here are the steps I take:

  1. Created a copy of my 4.11.2 project for 4.12P3
  2. Enabled Nativize Blueprint assets
  3. Test the game with PIE to verify working(No errors!)
  4. Packaged for Android(All)
  5. Encounter the error I posted

Could you try to do this with a clean project? Create a new blank blueprint project, enable Nativize Blueprint Assets, and then package it for Android (All).

When I ran through those steps, it worked on my end, so let me know your results.

Yes if I do these steps, it packaged successfully.

Okay, so it seems to be an issue with that particular project. In this case, I’d need to take a look at the project to attempt to determine the error. If you could, please zip up the project, upload it to Dropbox, and provide a link so I can download and take a look at it. You can PM me a link on the forums: https://forums.unrealengine.com/member.php?160394-Sean-Flint

Just for the records: This is still happening with the actual 4.12 release.

Hello,

I have reproduced your issue and entered a bug report, UE-31600, to be investigated by our developers. Thank you for your report.

Have a great day