Failed Packaging game for android & Windows

Hey Guys Please Help me, Everytime i want to package my game the same error always shown up.Could some body help me?

UATHelper: Packaging (Windows (64-bit)): Project.Build: ********** BUILD COMMAND STARTED **********
UATHelper: Packaging (Windows (64-bit)): CommandUtils.Run: Run: D:\Frogram\UE_4.17\Engine\Binaries\DotNET\UnrealBuildTool.exe thief2 Win64 Development -Project="C:\Users\Asus\Documents\Unreal Projects\thief2 4.17\thief2.uproject" -clean "C:\Users\Asus\Documents\Unreal Projects\thief2 4.17\thief2.uproject" -NoUBTMakefiles -PLUGIN "C:\Users\Asus\Documents\Unre
al Projects\thief2 4.17\Intermediate\Plugins\WindowsNoEditor\NativizedAssets\NativizedAssets.uplugin"  -remoteini="C:\Users\Asus\Documents\Unreal Projects\thief2 4.17" -skipdeploy -nobuilduht -NoHotReload
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: Messages while compiling C:\Users\Asus\Documents\Unreal Projects\thief2 4.17\Intermediate\Build\BuildRules\thief2ModuleRules.dll:
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: c:\Users\Asus\Documents\Unreal Projects\thief2 4.17\Intermediate\Plugins\Android_ATC\NativizedAssets\Source\NativizedAssets\NativizedAssets.Build.cs(5,14) : error CS0101: The namespace '<global namespace>' already contains a definition for 'NativizedAssets'
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: c:\Users\Asus\Documents\Unreal Projects\thief2 4.17\Intermediate\Plugins\Android_ETC1\NativizedAssets\Source\NativizedAssets\NativizedAssets.Build.cs(5,14) : error CS0101: The namespace '<global namespace>' already contains a definition for 'NativizedAssets'
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: c:\Users\Asus\Documents\Unreal Projects\thief2 4.17\Intermediate\Plugins\WindowsNoEditor\NativizedAssets\Source\NativizedAssets\NativizedAssets.Build.cs(5,14) : error CS0101: The namespace '<global namespace>' already contains a definition for 'NativizedAssets'
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ERROR: UnrealBuildTool encountered an error while compiling source files
UATHelper: Packaging (Windows (64-bit)): CommandUtils.Run: Run: Took 0.5494721s to run UnrealBuildTool.exe, ExitCode=5
UATHelper: Packaging (Windows (64-bit)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): D:\Frogram\UE_4.17\Engine\Binaries\DotNET\UnrealBuildTool.exe thief2 Win64 Development -Project="C:\Users\Asus\Documents\Unreal Projects\thief2 4.17\thief2.uproject" -clean "C:\
Users\Asus\Documents\Unreal Projects\thief2 4.17\thief2.uproject" -NoUBTMakefiles -PLUGIN "C:\Users\Asus\Documents\Unreal Projects\thief2 4.17\Intermediate\Plugins\WindowsNoEditor\NativizedAssets\NativizedAssets.uplugin"  -remoteini="C:\Users\Asus\Documents\Unreal Projects\thief2 4.17" -skipdeploy -nobuilduht -NoHotReload. See logfile for details: 'UnrealBui
ldTool-2017.08.18-16.57.36.txt' 
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.CommandUtils.RunAndLog(CommandEnvironment Env, String App, String CommandLine, String LogName, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary`2 EnvVars)
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, FileReference Project, String Target, String Platform, String Config, String AdditionalArgs, String LogName, Dictionary`2 EnvVars)
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.UE4Build.CleanWithUBT(String TargetName, UnrealTargetPlatform Platform, String Config, FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, String InAddArgs, Boolean ForceUnity, Dictionary`2 EnvVars)
UATHelper: Packaging (Windows (64-bit)):    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, Dictio
nary`2 InTargetToManifest)
UATHelper: Packaging (Windows (64-bit)):    at Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask)
UATHelper: Packaging (Windows (64-bit)):    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
UATHelper: Packaging (Windows (64-bit)):    at BuildCookRun.ExecuteBuild()
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.BuildCommand.Execute()
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, Dictionary`2 Commands)
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.Automation.Process(String[] Arguments)
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.Program.MainProc(Object Param)
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.Program.Main()
UATHelper: Packaging (Windows (64-bit)): Program.Main: AutomationTool exiting with ExitCode=5 (5)
UATHelper: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults: Error: Unknown Error

I have encountered the exact same problem. The key here is the following error:

error CS0101: The namespace '<global namespace>' already contains a definition for 'NativizedAssets'

When you activate blueprint nativization in Project Settings > Packaging, Unreal modifies your .uproject file and adds this section:

	"AdditionalPluginDirectories": [
		"Intermediate/Plugins"
	],

When you package the game for Windows, a new plugin is created in “Intermediate\Plugins\WindowsNoEditor\NativizedAssets” with the nativized code. If you package the game for Android later on, another plugin is created, this time in “Intermediate\Plugins\Android_ETC2\NativizedAssets”.

Because the two generated plugins have the same name (NativizedAssets.uplugin) and they are both located in sub-directories of the search path defined in the .uprojet file, you get this error where the build tool cannot decide between two plugins with the same name.

As a workaround, you can delete your Intermediate/Plugins directory each time you are about to package your game, and it should work fine.

When you activate blueprint nativization in Project Settings > Packaging Unreal modifies your .uproject file and adds this section:

That did not happen to me.

UE 4.17.1

i didn’t know how but i just download the new unreal engine 4.17 and it’s work