Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Error Building Native Samples on Android Studio with 1.0.4

mdelacallemdelacalle Posts: 1
NerveGear
edited December 2016 in Oculus Go Development
Hi All. I'm trying to build the Sample Apps as starting point with SDK 1.0.4. I have imported successfully and I'm trying to build the demos. My problem is that the c part of my app is not finding the include archives. Is there any documentation step by step for start development on Android Studio? Could anybody help me with this?
 
Thanks!!
 NDK -> 12b
 Gradle -> 2.14.1
 Plugin version -> 2.2.3

ERROR
 [armeabi-v7a] Compile thumb : vrcubeworld <= VrCubeWorld_SurfaceView.c [armeabi-v7a]
 Gdbserver : [arm-linux-androideabi] libs/armeabi-v7a/gdbserver [armeabi-v7a]
 Gdbsetup : libs/armeabi-v7a/gdb.setup jni
/../../../Src/VrCubeWorld_SurfaceView.c:63:10: fatal error: 'VrApi.h' file not found #include "VrApi.h" ^ 1 error generated.
make: *** [obj/local/armeabi-v7a/objs-debug/vrcubeworld/__/__/__/Src/VrCubeWorld_SurfaceView.o] Error 1 :VrSamples:Native:VrCubeWorld_SurfaceView:Projects:Android:NDKBuildDebug FAILED FAILURE:
Build failed with an exception.

Comments

  • miranttmirantt Posts: 2
    NerveGear
    edited January 2017
    I have the same problem. But when I try to build project using "Build.bat" file, it works perfectly. Can anyone help us to resolve the above issue?
  • abozeman8466abozeman8466 Posts: 2
    NerveGear
    I just tried using build.bat and got this error:


    C:\Users\abozeman\Downloads\ovr_sdk_mobile_1.0.4\VrSamples\Native\VrCubeWorld_Na
    tiveActivity\Projects\Android>build.bat
    C:\Users\abozeman\Downloads\ovr_sdk_mobile_1.0.4\bin\scripts\build\../../../grad
    lew --daemon -q    --version

    ------------------------------------------------------------
    Gradle 2.10
    ------------------------------------------------------------

    Build time:   2015-12-21 21:15:04 UTC
    Build number: none
    Revision:     276bdcded730f53aa8c11b479986aafa58e124a6

    Groovy:       2.4.4
    Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013
    JVM:          1.8.0_121 (Oracle Corporation 25.121-b13)
    OS:           Windows 7 6.1 amd64

    Gradle took 3.282188 seconds


    building in C:\Users\abozeman\Downloads\ovr_sdk_mobile_1.0.4
    keytool -v -genkey -keyalg RSA -keystore C:\Users\abozeman\Downloads\ovr_sdk_mob
    ile_1.0.4\android.debug.keystore -storepass android -alias androiddebugkey -keyp
    ass android -validity 10000 -dname CN=Android,O=Android,C=US
    C:\Users\abozeman\Downloads\ovr_sdk_mobile_1.0.4\bin\scripts\build\../../../grad
    lew --daemon -q    assembleRelease -Pandroid.injected.signing.store.file=C:\User
    s\abozeman\Downloads\ovr_sdk_mobile_1.0.4\android.debug.keystore -Pandroid.injec
    ted.signing.store.password=android -Pandroid.injected.signing.key.alias=androidd
    ebugkey -Pandroid.injected.signing.key.password=android
    make: Entering directory `C:/Users/abozeman/Downloads/ovr_sdk_mobile_1.0.4/VrApp
    Framework/Projects/Android'
    [armeabi-v7a] Compile++ arm  : vrappframework <= ImageData.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= BitmapFont.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= GlSetup.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= GlSetup_Android.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= GlTexture.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= GlTexture_Android.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= GlTexture_VrApi.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= GlProgram.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= GlGeometry.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= GlBuffer.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= PackageFiles.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= SurfaceTexture.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= VrCommon.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= Framebuffer.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= EyeBuffers.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= MessageQueue.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= TalkToJava.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= KeyState.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= App.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= App_Android.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= AppRender.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= PathUtils.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= SurfaceRender.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= DebugLines.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= VrFrameBuilder.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= Console.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= OVR_Input.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= OVR_Uri.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= OVR_FileSys.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= OVR_Stream.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= DebugConsole.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= JobManager.cpp
    [armeabi-v7a] Compile++ arm  : vrappframework <= OVR_TextureManager.cpp
    [armeabi-v7a] StaticLibrary  : libvrappframework.a
    make: Leaving directory `C:/Users/abozeman/Downloads/ovr_sdk_mobile_1.0.4/VrAppF
    ramework/Projects/Android'

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':VrAppFramework:Projects:Android:compileReleaseJavaWi
    thJavac'.
    > Could not find tools.jar

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug
    option to get more log output.

    command (C:\Users\abozeman\Downloads\ovr_sdk_mobile_1.0.4\bin\scripts\build\../.
    ./../gradlew --daemon -q    assembleRelease -Pandroid.injected.signing.store.fil
    e=C:\Users\abozeman\Downloads\ovr_sdk_mobile_1.0.4\android.debug.keystore -Pandr
    oid.injected.signing.store.password=android -Pandroid.injected.signing.key.alias
    =androiddebugkey -Pandroid.injected.signing.key.password=android ) failed with r
    eturncode: 1

    C:\Users\abozeman\Downloads\ovr_sdk_mobile_1.0.4\VrSamples\Native\VrCubeWorld_Na
    tiveActivity\Projects\Android>

  • Elizer0x0309Elizer0x0309 Posts: 1
    NerveGear
    edited May 2018
    Native Development (undocumented steps)
    1. Android Studio
    2. cmd: set ANDROID_NDK_HOME=<prefix-path>\AndroidSDK\ndk-bundle
    3. cmd: set PATH=%PATH%;<prefix-path>\jdk1.8.0_172\bin
    4. cmd:<VrProject>\Projects\Android\build.bat

Sign In or Register to comment.