I'm building for GearVR using Unity 5.3.4f1 on Mac OSX. The APK builds fine, but when I attempt to upload the APK on my developer dashboard, I get an "APK Validation Failed" and the error is "Oculus SDK version is not 1.0 or newer."
But I'm using Unity >= 5.3.4, and I have "Virtual Reality Supported" in PlayerSettings. Everything I can find tells me that I don't need to add anything to my Unity project. I don't have the Oculus Utilities in my project because I don't need them (but I have tried adding them and it didn't fix this problem). As far as I understand, if I'm building an app with Unity 5 I shouldn't need to worry about Oculus SDKs at all, should I? Or is this possibly a misconfiguration of my AndroidManifest.xml or PlayerSettings or some other config?
I tried running the check_submission utility on my APK and it tells me the same error.
I recall there was an issue with the check_submissions tool on OSX that caused it to (incorrectly) claim mobile apks were using less than SDK 1.0. However, I don't believe this was a problem with the developer dashboard, so in that case I would wonder if you're really on an old SDK.
So I discovered the issue - my workflow was exporting the Android project from Unity and then using ant to build the APK as a separate step. I was mainly doing this to ensure my AndroidManifest.xml was being output correctly (it is :smile:) Well, it seems if you build the APK using ant with the Android project generated by Unity (or import the project to Android Studio and build with gradle, same difference) the validation fails and it detects an incorrect (or missing) SDK. I switched my workflow to have Unity build the APK and the APK validates just fine.
I'm not sure if this is a Unity bug, or if this is expected behavior and I just missed some documentation, but at the very least hopefully people Googling the same problem will find this solution. Although it might not be a solution if people really need to create the Android project to do extra Android stuff before building the binary.