How to sign Gear VR APK using Signature Scheme V1?

Hi,

I’m using 2017.2b but this error also occurred in 2017.1. I’m trying to build an APK for distribution in the Oculus store. Signed APKs nowadays are generated using Signature Scheme V2, which Oculus does not support. The Android documentation says that in order to use V1, you must add “v2SigningEnabled false” to your Gradle file.

I switched the build system to Gradle, and made a custom Gradle file. Beneath defaultConfigs, I added:

signingConfigs {
    release {
        storeFile file("myreleasekey.keystore")
        storePassword "mypassword"
        keyAlias "MyReleaseKey"
        keyPassword "mypassword"
        v2SigningEnabled false
    }
}

Gradle complains that it cannot find “v2SigningEnabled”. Full error message here.

Has anyone run into this before? How did you sign your app for Oculus?

Turns out there is no good way to do it from within Unity. Rather than using Gradle, you can use the regular internal build system then re-sign using jarsigner.

For more information, refer to the following video: Oculus Store CLI - workflow for GearVR + Unity2017 publishing - YouTube

I think all you need to do is File > Build Settings > Build System > Internal.

That seemed to work great for me! I didn’t have to resign using jarsigner.

Oh no… Is there a simple solution already?