Fail to build for Gear VR

Please help.
I’ve been trying various combinations of re-installing; TEGRA, Android Works,Visual Studio, UE4 and even Java!
But for every project, including sample projects in Blueprint and C++, I always get the following fail.

====30/05/2016 10:17:06====PREPARING NATIVE CODE=================================================================
MainFrameActions: Packaging (Android (ETC2)): UEDeployAndroid.GenerateManifest: Disabling Show Launch Image for GearVR enabled application
MainFrameActions: Packaging (Android (ETC2)): UEDeployAndroid.UpdateProjectProperties:
MainFrameActions: Packaging (Android (ETC2)): ====30/05/2016 10:17:06====UPDATING BUILD CONFIGURATION FILES====================================================
MainFrameActions: Packaging (Android (ETC2)): CreateProcess failed:
MainFrameActions: Packaging (Android (ETC2)): [3] The system cannot find the path specified.
MainFrameActions: Packaging (Android (ETC2)): CreateProcess failed:
MainFrameActions: Packaging (Android (ETC2)): [3] The system cannot find the path specified.
MainFrameActions: Packaging (Android (ETC2)): UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Updating project.properties, local.properties, and build.xml…
MainFrameActions: Packaging (Android (ETC2)): CreateProcess failed:
MainFrameActions: Packaging (Android (ETC2)): [3] The system cannot find the path specified.
MainFrameActions: Packaging (Android (ETC2)): CreateProcess failed:
MainFrameActions: Packaging (Android (ETC2)): [3] The system cannot find the path specified.
MainFrameActions: Packaging (Android (ETC2)): CreateProcess failed:
MainFrameActions: Packaging (Android (ETC2)): [3] The system cannot find the path specified.
MainFrameActions: Packaging (Android (ETC2)): CreateProcess failed:
MainFrameActions: Packaging (Android (ETC2)): [3] The system cannot find the path specified.
MainFrameActions: Packaging (Android (ETC2)): UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Updating project.properties, local.properties, and build.xml…
MainFrameActions: Packaging (Android (ETC2)): CreateProcess failed:
MainFrameActions: Packaging (Android (ETC2)): [3] The system cannot find the path specified.
MainFrameActions: Packaging (Android (ETC2)): CreateProcess failed:
MainFrameActions: Packaging (Android (ETC2)): [3] The system cannot find the path specified.
MainFrameActions: Packaging (Android (ETC2)): UEDeployAndroid.UpdateGameActivity:
MainFrameActions: Packaging (Android (ETC2)): ==== Writing new GameActivity.java file to F:\Unreal VR\Lab_VR01\Intermediate/Android/APK\src\com\epicgames\ue4\GameActivity.java ====
MainFrameActions: Packaging (Android (ETC2)): UEDeployAndroid.MakeApk:
MainFrameActions: Packaging (Android (ETC2)): Copying new .so C:\Program Files (x86)\Epic Games\4.10\Engine\Binaries\Android\UE4Game-armv7-es2.so file to jni folder…
MainFrameActions: Packaging (Android (ETC2)): UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Preparing native code for debugging…
MainFrameActions: Packaging (Android (ETC2)): AndroidPluginLanguage.ProcessPluginNode:
MainFrameActions: Packaging (Android (ETC2)): File C:\Program Files (x86)\Epic Games\4.10/Engine/Source/ThirdParty/Oculus/LibOVRMobile/LibOVRMobile_062/VrApi/Libs/Android/armeabi-v7a/libvrapi.so copied to F:\Unreal VR\Lab_VR01\Intermediate/Android/APK/libs/armeabi-v7a/libvrapi.so
MainFrameActions: Packaging (Android (ETC2)): AndroidPluginLanguage.ProcessPluginNode:
MainFrameActions: Packaging (Android (ETC2)): File C:\Program Files (x86)\Epic Games\4.10/Engine/Source/ThirdParty/Oculus/LibOVRMobile/LibOVRMobile_062/VrApi/Libs/Android/VrApi.jar copied to F:\Unreal VR\Lab_VR01\Intermediate/Android/APK/libs/VrApi.jar
MainFrameActions: Packaging (Android (ETC2)): AndroidPluginLanguage.ProcessPluginNode:
MainFrameActions: Packaging (Android (ETC2)): File C:\Program Files (x86)\Epic Games\4.10/Engine/Source/ThirdParty/Oculus/LibOVRMobile/LibOVRMobile_062/1stParty/VrPlatform/libs/vrplatlib.jar copied to F:\Unreal VR\Lab_VR01\Intermediate/Android/APK/libs/vrplatlib.jar
MainFrameActions: Packaging (Android (ETC2)): UEDeployAndroid.MakeApk:
MainFrameActions: Packaging (Android (ETC2)): ====30/05/2016 10:17:12====PERFORMING FINAL APK PACKAGE OPERATION================================================
MainFrameActions: Packaging (Android (ETC2)): UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Making .apk with Ant… (note: it’s safe to ignore javac obsolete warnings)
MainFrameActions: Packaging (Android (ETC2)): The system cannot find the file C:\ProgramData\Oracle\Java\javapath\java.exe.
MainFrameActions: Packaging (Android (ETC2)): BuildCommand.Execute: ERROR: BUILD FAILED
MainFrameActions: Packaging (Android (ETC2)): Program.Main: ERROR: AutomationTool terminated with exception:
MainFrameActions: Packaging (Android (ETC2)): Program.Main: ERROR: Exception in UnrealBuildTool: ERROR: cmd.exe failed with args /c “C:/NVPACK/apache-ant-1.8.2/bin/ant.bat” debug
MainFrameActions: Packaging (Android (ETC2)): Stacktrace: at UnrealBuildTool.Android.UEDeployAndroid.RunCommandLineProgramAndThrowOnError(String WorkingDirectory, String Command, String Params, String OverrideDesc, Boolean bUseShellExecute)
MainFrameActions: Packaging (Android (ETC2)): at UnrealBuildTool.Android.UEDeployAndroid.MakeApk(String ProjectName, String ProjectDirectory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bMakeSeparateApks, Boolean bIncrementalPackage, Boolean bDisallowPackagingDataInApk)
MainFrameActions: Packaging (Android (ETC2)): at UnrealBuildTool.Android.UEDeployAndroid.PrepForUATPackageOrDeploy(String ProjectName, String ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bIsDataDeploy)
MainFrameActions: Packaging (Android (ETC2)): at AndroidPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL)
MainFrameActions: Packaging (Android (ETC2)): at Project.Package(ProjectParams Params, Int32 WorkingCL)
MainFrameActions: Packaging (Android (ETC2)): at BuildCookRun.DoBu
MainFrameActions: Packaging (Android (ETC2)): ildCookRun(ProjectParams Params)
MainFrameActions: Packaging (Android (ETC2)): at BuildCommand.Execute()
MainFrameActions: Packaging (Android (ETC2)): at AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands)
MainFrameActions: Packaging (Android (ETC2)): at AutomationTool.Automation.Process(String[] CommandLine)
MainFrameActions: Packaging (Android (ETC2)): at AutomationTool.Program.MainProc(Object Param)
MainFrameActions: Packaging (Android (ETC2)): at AutomationTool.InternalUtils.RunSingleInstance(Action`1 Main, Object Param)
MainFrameActions: Packaging (Android (ETC2)): at AutomationTool.Program.Main()
MainFrameActions: Packaging (Android (ETC2)): ProcessManager.KillAll: Trying to kill 0 spawned processes.
MainFrameActions: Packaging (Android (ETC2)): Program.Main: AutomationTool exiting with ExitCode=Error_Unknown
MainFrameActions: Packaging (Android (ETC2)): Domain_ProcessExit
MainFrameActions: Packaging (Android (ETC2)): copying UAT log files…
MainFrameActions: Packaging (Android (ETC2)): RunUAT.bat ERROR: AutomationTool was unable to run successfully.
MainFrameActions: Packaging (Android (ETC2)): BUILD FAILED

Any help will be really appreciated as I’m on the verge of giving up!

Thank you.
Phil

Okay I’ve corrected one problem which was the path to the JDk file.
But I’m still getting a the APK packaging fail!

BuildCommand.Execute: ERROR: BUILD FAILED
MainFrameActions: Packaging
: Program.Main: ERROR: AutomationTool terminated with exception:
Program.Main: ERROR: Exception in UnrealBuildTool: ERROR: cmd.exe failed with args /c “C:/NVPACK/apache-ant-1.8.2/bin/ant.bat” debug
Stacktrace: at UnrealBuildTool.Android.UEDeployAndroid.RunCommandLineProgramAndThrowOnError(String WorkingDirectory, String Command, String Params, String OverrideDesc, Boolean bUseShellExecute)
UnrealBuildTool.Android.UEDeployAndroid.MakeApk(String ProjectName, String ProjectDirectory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bMakeSeparateApks, Boolean bIncrementalPackage, Boolean bDisallowPackagingDataInApk)
UnrealBuildTool.Android.UEDeployAndroid.PrepForUATPackageOrDeploy(String ProjectName, String ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bIsDataDeploy)
AndroidPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL)
Project.Package(ProjectParams Params, Int32 WorkingCL)
): at BuildCookRun.DoBu
): ildCookRun(ProjectParams Params)
BuildCommand.Execute()
AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands)
AutomationTool.Automation.Process(String[] CommandLine)
AutomationTool.Program.MainProc(Object Param)
AutomationTool.InternalUtils.RunSingleInstance(Action`1 Main, Object Param)
AutomationTool.Program.Main()
MainFrameActions: Packaging
: ProcessManager.KillAll: Trying to kill 0 spawned processes.
): Program.Main: AutomationTool exiting with ExitCode=Error_Unknown
): Domain_ProcessExit
): copying UAT log files…
: RunUAT.bat ERROR: AutomationTool was unable to run successfully.
MainFrameActions: Packaging (Android (ETC2)): BUILD FAILED

Make sure that you have all of the build tools installed for Android. [Here is the documentation for Android][1].

Make sure that your Android SDK looks like this as well:

Thanks for your response Samantha.
As you can hopefully see from my update to the original posting - I had the SDK path to the JDK incorrectly mapped. But I changed it (matching your screen grab) and it still fails as listed above.
I’m using Visual Studio 15, could the be the problem? Should I uninstall everything and try again and if so is there a preferred order of installing the components e.g. UE4, VS then Tegra?
Cheers
Phil

2015 isn’t supported for UE 4.10, use 2013. Let me know what happens when you do that, if you receive another error - upload the logs.

Thanks! :slight_smile:

Thanks Samantha - I’ll give it a go and keep you posted.

Phil

Samantha - Success!!!
And feel free to call me a moron - the problem was the project title!
I was using _ instead of . in the package title!
Thank you for your help and your patience.
Phil

Samantha - success.
The problem all along was the project title! I was using _ instead of . and that made it fail. Thank you for your time and patience - Phil