I'm trying to build the Mobile SDK v1.0.0's version of VrCubeWorld_NativeActivity under Linux (Ubuntu) with the command line tools, and have run into a bit of difficulty. The command line tools ran fine for SDK v0.6.2.0, but now that things are using Gradle there's some secret sauce I'm missing.
What I have so far:
Most of the text files in the SDK have DOS line endings, and need to be converted. Also, the scripts that come out of the zip file don't have execute permissions. Let's assume that ovr_sdk_mobile_1.0.0.0.zip is installed into ~/android/ovr_sdk_mobile, and the proper level of tools are installed (Andriod API 19, Build Tools v22.0.1). That gets us something like the following.
cd ~/android/ovr_sdk_mobile/VrSamples/Native/VrCubeWorld_NativeActivity/Projects/Android chmod ug+x ./build.py chmod ug+x ../../../../../gradlew
cp ~/Downloads/oculussig_whatever ../../assets/ <-- this is the signature file downloaded from the Oculus Dev site.
./build.py
This gets us most of the way there. All of the libraries build properly, but when the project itself tries to build we get the following error:
FAILURE: Build failed with an exception.
* What went wrong: Task 'assembleRelease' not found in root project 'VrCubeWorld_NativeActivity'.
This is from line 265 in bin/scripts/build/ovrbuild.py, where gradle is called with the "assembleRelease" directive. Alas, since build.gradle doesn't have a release buildType, we get the failure.
So what in the configuration is missing? Are the files in the SDK incomplete? Are there build instructions where something more than ./build.py needs to be run? Any suggestions?
* What went wrong: Execution failed for task ':VrSamples:Native:VrCubeWorld_NativeActivity:Projects:Android:NDKBuildDebug'. > Process 'command 'C:\Users\Master-Pc\AppData\Local\Android\android-ndk-r11c/ndk-build.cmd'' finished with non-zero exit value 2
* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
I really wanted to try to go the Oculus path as opposed to Daydream but I cannot believe that I can't build an APK in Android Studio. I keep having the same problem building the NativeActivity sample. My gradle console output is below. Can anyone just give me hint on what I need to do?
:VrSamples:Native:VrCubeWorld_NativeActivity:Projects:Android:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).