Search code examples
androidandroid-studiogear-vr

Android Studio + Oculus Mobile SDK (GearVR, Win8, ovr 1.0.3)


Is anyone using Android Studio to develop GearVR apps? I am trying to set it up according to the developer documentation, but I get a weird error on buildtime.

I've followed all of this setup: https://developer.oculus.com/documentation/mobilesdk/latest/concepts/mobile-studio-setup-android-win/ Where you install JDK, SDK, Android Studio, NDK.

I've downloaded the Oculus Mobile SDK ovr_sdk_mobile_1.0.3 and then in Android Studio New-Import-select build.gradle of sample. (https://developer.oculus.com/documentation/mobilesdk/latest/concepts/mobile-studio-basics/) When trying to run it, the error I get is:

:VrSamples:Native:CinemaSDK:Projects:Android:prepareCinemaSDKVrAppSupportVrGUIProjectsAndroidPrebuiltUnspecifiedLibrary FAILED

Error:A problem was found with the configuration of task ':VrSamples:Native:CinemaSDK:Projects:Android:prepareCinemaSDKVrAppSupportVrGUIProjectsAndroidPrebuiltUnspecifiedLibrary'.
> File 'C:\Dev_AS\ovr_sdk_mobile_1.0.3\VrAppSupport\VrGUI\Libs\Android\VrGUI.aar' specified for property 'bundle' does not exist.

Googling this error tells me it is supposed to be an old compiler error that has long since been fixed. The file it looks for "VrGUI.aar" does not exist, not even the folder ("Android") it's supposed to be in either, folder "Libs" is empty. There is no VrGUI.aar file in the entire oculus mobile sdk folder.

I really don't know how to fix this, I am thinking of simply trying it on a different PC again all from scratch.

Edit: I have tried changing the buildToolsVersion and also the

dependencies {
    classpath 'com.android.tools.build:gradle:1.5.0'
  }

gradle version to 1.5.0+ or 2.1.2(being the latest). Both to no avail.


Solution

  • I met a similar situation. But, when I re-unzipped ovr_sdk_mobile_1.0.3.zip, I found "VrAppSupport\VrGUI\Libs\Android\VrGUI.aar".

    Maybe, We ran a clean script and removed the file.