cancel
Showing results for 
Search instead for 
Did you mean: 

Run native oculus go native example android studio

baiardi_maurizi
Level 2
Hi, I’m new to oculus develop. I’m trying to run samples without luck.
Android Studio 3.3.2
Build #AI-182.5107.16.33.5314842, built on February 16, 2019
JRE: 1.8.0_152-release-1248-b01 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6
I followed steps in:
https://developer.oculus.com/documentation/mobilesdk/latest/concepts/mobile-studio-basics/
opened:
ovr_sdk_mobile_1.22 copia/VrSamples/VrCubeWorld_NativeActivity/Projects/Android/build.gradle
copie local.properties to “ovr_sdk_mobile_1.22 copia”
the message in step 3: When asked if you would like the project to use the Gradle wrapper, click OK. is different, it not find wrapper and ask me to download it, it download 4.10.1
the error now is: ERROR: Unsupported method: AndroidProject.getVariantNames()
so I changed 
gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
and build.gradle
apply plugin: 'com.android.application'
apply from: "${rootProject.projectDir}/VrApp.gradle"

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

android {
    buildToolsVersion "27.0.3"
. . . 
}
now the error
ERROR: Could not find method classpath() for arguments [com.android.tools.build:gradle:4.4.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
truedepth with different distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip


How can I make it run?
thanks 


2 REPLIES 2

baiardi_maurizi
Level 2
now I have updated to gradle 5.1 and give me this error:
ERROR: Could not find method leftShift() for arguments [VrAppPlugin$_apply_closure4@76b9159b] on task ':VrSamples:VrCubeWorld_SurfaceView:Projects:Android:cleanWorkAround' of type org.gradle.api.DefaultTask.

baiardi_maurizi
Level 2
now (another try) give me this error:
SIMPLE: Build command failed.


SIMPLE: Error while executing process /librerieGiochi/android-ndk-r13b/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/librerieGiochi/ovr_sdk_mobile_1.22 copia/VrSamples/VrCubeWorld_NativeActivity/Projects/Android/jni/Android.mk NDK_APPLICATION_MK=/librerieGiochi/ovr_sdk_mobile_1.22 copia/VrSamples/VrCubeWorld_NativeActivity/Projects/Android/jni/Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=0 APP_PLATFORM=android-21 NDK_OUT=/librerieGiochi/ovr_sdk_mobile_1.22 copia/VrSamples/VrCubeWorld_NativeActivity/Projects/Android/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=/librerieGiochi/ovr_sdk_mobile_1.22 copia/VrSamples/VrCubeWorld_NativeActivity/Projects/Android/build/intermediates/ndkBuild/release/lib V=0 -j8 -C/librerieGiochi/ovr_sdk_mobile_1.22 copia/VrSamples/VrCubeWorld_NativeActivity/Projects/Android APP_PLATFORM=android-21 NDK_TOOLCHAIN_VERSION=clang APP_STL=c++_static NDK_DEBUG=0 OVR_DEBUG=0 USE_ASAN=0 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}


SIMPLE: make: *** /librerieGiochi/ovr_sdk_mobile_1.22: Is a directory.  Stop.


SIMPLE: Build command failed.


SIMPLE: Error while executing process /librerieGiochi/android-ndk-r13b/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/librerieGiochi/ovr_sdk_mobile_1.22 copia/VrSamples/VrCubeWorld_NativeActivity/Projects/Android/jni/Android.mk NDK_APPLICATION_MK=/librerieGiochi/ovr_sdk_mobile_1.22 copia/VrSamples/VrCubeWorld_NativeActivity/Projects/Android/jni/Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-21 NDK_OUT=/librerieGiochi/ovr_sdk_mobile_1.22 copia/VrSamples/VrCubeWorld_NativeActivity/Projects/Android/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/librerieGiochi/ovr_sdk_mobile_1.22 copia/VrSamples/VrCubeWorld_NativeActivity/Projects/Android/build/intermediates/ndkBuild/debug/lib V=0 -j8 -C/librerieGiochi/ovr_sdk_mobile_1.22 copia/VrSamples/VrCubeWorld_NativeActivity/Projects/Android APP_PLATFORM=android-21 NDK_TOOLCHAIN_VERSION=clang APP_STL=c++_static NDK_DEBUG=1 OVR_DEBUG=1 USE_ASAN=1 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}


SIMPLE: make: *** /librerieGiochi/ovr_sdk_mobile_1.22: Is a directory.  Stop.