[Gear VR] Deploying Shipping build to Gear VR fails

Forum thread: UE 4.12.5 Building Shipping build fails :( - XR Development - Unreal Engine Forums(

I can build development builds no problem. Building shipping builds fails with:

====8/18/2016 9:22:55 PM====PERFORMING FINAL APK PACKAGE OPERATION================================================ MainFrameActions: Packaging (Android (ETC2)): Program.Main: ERROR: AutomationTool terminated with exception: ERROR: DistributionSigning settings are not all set. Check the DistributionSettings section in the Andriod tab of Project Settings MainFrameActions: Packaging (Android (ETC2)): Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)

Here is the full log: https://drive.google.com/open?id=0Bw...3ByMzJpN0FGT1U

Here is a video showing me turning on Shipping build settings: ss2 dev stream 28 - YouTube
If I uncheck “For Distribution” option in the Packaging in Project Settings, but leave everything else as seen in the video, build is successful, but Oculus validator still says it’s a debug/development build

So, if I was deploying for Android, I would have to fill out fields in the For Distribution section in Android section (keys and all that). Gear VR doesn’t require those, so it sounds like a bug to me.

You need to create your keystore for the “For Distribution” checkbox to work - it basically signs the app without this it is always signed as a debug app by UE4

Once you create and place your keystore in the correct location you need to enter the details of it in the “Distribution signing” section of the Android settings in UE4.

Step by step:

Making a key.

You can find the keytool.exe file in the NVPACK installed with your Android Dependancies (default is C:\NVPACK) under the jdk#.#.#_## subfolder\bin. Then you can run the following in the Command Line

 keytool -genkey -v -keystore C:\Users\YourUserName\YourAppName.keystore -alias YourAppName -keyalg RSA -keysize 2048 -validity 10000

Then insert the keystore file generated in your project folder here:

\Unreal Projects\YourAppName\Build\Android

and then insert your keystore details into the “Distribution Signing” section of Android settings:

Thanks a bunch!!!

Do I need -storepass parameter ? (not seeing it in your cmd line)

Also, what kind of file is YourAppName.keystore and what goes inside ?

  1. No it will ask you for a password once you run it
  2. it’s a keystore file - it comes out to about 3kb and contains unreadable stuff in it :smiley: