Google VR (Android ATC) Packaging Failed

I’ve followed the Unreal Engine’s “Google VR” Documentation several times and everytime I’ve got this:

UATHelper: Packaging (Android (ATC)): Running AutomationTool…
UATHelper: Packaging (Android (ATC)): Automation.ParseCommandLine: Parsing command line: -ScriptsForProject=D:/PROIECTE//VR/VR.uproject BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=D:/PROIECTE//VR/VR.uproject -cook -stage -archive -archivedirectory=D:/PROIECTE
UATHelper: Packaging (Android (ATC)): //VR -package -clientconfig=Development -ue4exe=UE4Editor-Cmd.exe -pak -prereqs -nodebuginfo -targetplatform=Android -cookflavor=ATC -build -CrashReporter -utf8output
UATHelper: Packaging (Android (ATC)): Automation.Process: Setting up command environment.
UATHelper: Packaging (Android (ATC)): WindowsPlatform.get_Compiler: WARNING: Visual C++ 2015 toolchain does not appear to be correctly installed. Please verify that “Common Tools for Visual C++ 2015” was selected when installing Visual Studio 2015.
UATHelper: Packaging (Android (ATC)): BuildCookRun.SetupParams: Setting up ProjectParams for D:\PROIECTE\VR\VR.uproject
UATHelper: Packaging (Android (ATC)): Project.Build: ********** BUILD COMMAND STARTED **********
UATHelper: Packaging (Android (ATC)): CommandUtils.Run: Run: D:\Epic Games\4.13\Engine\Binaries\DotNET\UnrealBuildTool.exe VR Android Development -Project=D:\PROIECTE\VR\VR.uproject D:\PROIECTE\VR\VR.uproject -remoteini=“D:\PROIECTE\VR” -noxge -generatemanifest -NoHotRel
UATHelper: Packaging (Android (ATC)): oad
UATHelper: Packaging (Android (ATC)): UnrealBuildTool: NDK version: 21, GccVersion: 4.9
UATHelper: Packaging (Android (ATC)): UnrealBuildTool: building WITHOUT VULKAN define
UATHelper: Packaging (Android (ATC)): UnrealBuildTool: Vulkan SDK is installed, but the project disabled Vulkan (bSupportsVulkan setting in Engine). Disabling Vulkan RHI for Android
UATHelper: Packaging (Android (ATC)): CommandUtils.Run: Run: Took 1.5325881s to run UnrealBuildTool.exe, ExitCode=0
UATHelper: Packaging (Android (ATC)): CommandUtils.Run: Run: D:\Epic Games\4.13\Engine\Binaries\DotNET\UnrealBuildTool.exe VR Android Development -Project=D:\PROIECTE\VR\VR.uproject D:\PROIECTE\VR\VR.uproject -remoteini=“D:\PROIECTE\VR” -noxge -NoHotReload -ignorejunk
UATHelper: Packaging (Android (ATC)): UnrealBuildTool: Creating makefile for VR (.uproject file is newer)
UATHelper: Packaging (Android (ATC)): UnrealBuildTool: NDK version: 21, GccVersion: 4.9
UATHelper: Packaging (Android (ATC)): UnrealBuildTool: building WITHOUT VULKAN define
UATHelper: Packaging (Android (ATC)): UnrealBuildTool: Vulkan SDK is installed, but the project disabled Vulkan (bSupportsVulkan setting in Engine). Disabling Vulkan RHI for Android
UATHelper: Packaging (Android (ATC)): UnrealBuildTool: Compiling Native code with NDK API ‘android-21’
UATHelper: Packaging (Android (ATC)): UnrealBuildTool: Performing 2 actions (2 in parallel)
UATHelper: Packaging (Android (ATC)): UnrealBuildTool: [1/2] clang++.exe UELinkerFixups.cpp [armv7-es2]
UATHelper: Packaging (Android (ATC)): UnrealBuildTool: [2/2] clang++.exe VR-armv7-es2.so
UATHelper: Packaging (Android (ATC)): UnrealBuildTool: C:/NVPACK/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/…/…/…/…/arm-linux-androideabi/bin\ld: error: D:/Epic Games/4.13/Engine/Plugins/Runtime/GoogleVR/GoogleVRHMD/Bin
UATHelper: Packaging (Android (ATC)): aries/Android/UE4-GoogleVRHMD-armv7-es2.a(Module.GoogleVRHMD.cpp-armv7-es2.o): multiple definition of ‘GetHMD()’
UATHelper: Packaging (Android (ATC)): UnrealBuildTool: C:/NVPACK/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/…/…/…/…/arm-linux-androideabi/bin\ld: D:/Epic Games/4.13/Engine/Plugins/Runtime/GearVR/Binaries/Android/UE4-Gea
UATHelper: Packaging (Android (ATC)): rVR-armv7-es2.a(Module.GearVR.cpp-armv7-es2.o): previous definition here
UATHelper: Packaging (Android (ATC)): UnrealBuildTool: clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
UATHelper: Packaging (Android (ATC)): UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: D:\PROIECTE\VR\Binaries\Android\VR-armv7-es2.so
UATHelper: Packaging (Android (ATC)): UnrealBuildTool: Total build time: 23.88 seconds
UATHelper: Packaging (Android (ATC)): CommandUtils.Run: Run: Took 24.0711014s to run UnrealBuildTool.exe, ExitCode=5
UATHelper: Packaging (Android (ATC)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): D:\Epic Games\4.13\Engine\Binaries\DotNET\UnrealBuildTool.exe VR Android Development -Project=D:\PROIECTE\VR\VR.uproject D:\PROIECTE\VR\VR.uproject -remoteini=“D:\P
ROIECTE\VR” -noxge -NoHotReload -ignorejunk. See logfile for details: ‘UnrealBuildTool-2016.09.20-11.21.12.txt’
UATHelper: Packaging (Android (ATC)): at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary2 EnvVars, SpewFilterCallbackType SpewFilterCallback) UATHelper: Packaging (Android (ATC)): at AutomationTool.CommandUtils.RunAndLog(CommandEnvironment Env, String App, String CommandLine, String LogName, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
UATHelper: Packaging (Android (ATC)): at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary2 EnvVars) UATHelper: Packaging (Android (ATC)): at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, FileReference Project, String Target, String Platform, String Config, String AdditionalArgs, String LogName, Dictionary2 EnvVars)
UATHelper: Packaging (Android (ATC)): 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, Dictionary2 EnvVars) UATHelper: Packaging (Android (ATC)): at AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary2 PlatformEnvVars, Nullable1 InChangelistNumberOverride, Dictionar
y2 InTargetToManifest) UATHelper: Packaging (Android (ATC)): at Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask) UATHelper: Packaging (Android (ATC)): at BuildCookRun.DoBuildCookRun(ProjectParams Params) UATHelper: Packaging (Android (ATC)): at AutomationTool.BuildCommand.Execute() UATHelper: Packaging (Android (ATC)): at AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands) UATHelper: Packaging (Android (ATC)): at AutomationTool.Automation.Process(String[] Arguments) UATHelper: Packaging (Android (ATC)): at AutomationTool.Program.MainProc(Object Param) UATHelper: Packaging (Android (ATC)): at AutomationTool.InternalUtils.RunSingleInstance(Func2 Main, Object Param)
UATHelper: Packaging (Android (ATC)): at AutomationTool.Program.Main()
UATHelper: Packaging (Android (ATC)): Program.Main: AutomationTool exiting with ExitCode=5 (5)
UATHelper: Packaging (Android (ATC)): BUILD FAILED
PackagingResults:Error: Error Unknown Error

This results from a default FirstPersonExampleMap (with the specific settings from the Unreal Engine’s “Google VR” Documentation).
Any suggestions will help me a lot :slight_smile:

Hi Andrei,

There is a known issue right now with the error you’re getting specifically in this log for “Multiple Definitions of GetHMD()” function. This is reported here: Unreal Engine Issues and Bug Tracker (UE-35691)

This is a bug that happens when having multiple VR plugins enabled like GoogleVR and GearVR. Since GearVR is enabled by default when you enabled GoogleVR you get this error. You can workaround this by disabling the GearVR plugin to solve this specific build issue. You may have others that come up with your normal build process, but this one is resolved by these steps.

This targeted to be fixed in 4.14 when that releases in the coming months.

-Tim

Thank you so much Tim :smiley:
I’ve disabled the GearVR plugin and everything works perfectly for the FirstPerson default map. I don’t know yet how it will work on a real game with a lot and graphics and stuff, but I will probably create another topic when I finish my project.
Thank u again and sorry for delay…