I'm using Unity 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:
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?