cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug native code in OculusVideo360SDK in Android Studio?

cloudscreensvr
Honored Guest

I was trying to run native debugging in one of the oculus samples as described in:

https://developer.oculus.com/documentation/mobilesdk/latest/concepts/mobile-studio-debug/

However breakpoints in native code are not hit.

I have added the jniDebuggable value as below:

  buildTypes {
debug {
jniDebuggable true
}
}

and I have also added the native configuration with the symbol path as: C:\Oculus\Mobile\VrSamples\Native\Oculus360VideosSDK\Projects\Android\obj\local\armeabi-v7a

How can I get native debug to work, what am I doing wrong?

Running Android Studio 2.1.3 with Windows 10

9 REPLIES 9

Mitnainartinari
Protege
I've had a lot of problems getting breakpoints to work with native apps as well. It might be possible using standard Gradle, but I currently use the experimental Gradle plugin to get good debug integration in Android Studio for native apps. I'm using it in my current Oculus Mobile app. It works well with breakpoints. If you're willing to fiddle around with it there's a good tutorial at http://ph0b.com/new-android-studio-ndk-support/

I can send you my Gradle files if you'd like to see a sample one that uses the plugin that works with Oculus Mobile (although I'm far from an expert at Gradle, so don't take them as being good Gradle files).

Also, you should be using the hybrid debugger. If you can set breakpoints in Java code but not in C++, then you're probably just using the wrong debugger, which can be changed if you go to the edit configurations dialog, which isn't present in the screenshot at the link you posted.

cloudscreensvr
Honored Guest
Thank you for you answer, I tried it with both the hybrid debugger and the native-only debugger, to no avail.

I thought that the stable release supported native debugging based on the sdk documents, I'll take a look that tutorial and see what I can do.

I would indeed appreciate sample Gradle files if it's not too much trouble. 

Mitnainartinari
Protege
Here's my gradle files that use the experimental plugin. I wouldn't say this is the recommended way, and it's a little complicated if you're just trying to quickly get a basic project set up. I was having too many problems adapting the Gradle files provided in the SDK to properly use the experimental plugin, so I started from scratch and I removed how the dependencies were built in. It might take a while to change the samples to use this method, but I found starting a new project this way much better. These Gradle files are for a project that has support for in-app purchases and leaderboards through the platform SDK, and uses Freetype, FMOD, Freeimage, and keyczar with OpenSSL. There's some extra stuff in the Gradle file to get full debug integration as well as code-complete-type stuff to work. Debugging works great with the C++ code. The include paths also make auto-complete work properly, as well as navigating to all declarations/heading files. You'll notice there are a few lines where information is duplicated but using different ways (eg. some of the link commands, and some of the include paths are listed in a Gradle block as well as in the cppFlags). This was because proper integration with Android Studio didn't seem to work well with only one of them.

Here's my directory structure:

app/
-libs/ (for jars)
-src/
--main/
---assets/
---java/com/...
---jni/
---res/...

In my static blocks in MainActivity, I have System.loadLibrary calls for fmod, mymodule (whatever you call your NDK module in the moduleName line below), and vrapi. My libs dir that's referenced at the bottom of the app module (the compile fileTree line) is located at app/libs, and has svcjar.jar, SystemUtils.jar, VrApi.jar, VrAppFramework.jar, and vrplatlib.jar (along with fmod.jar, but that's not part of the SDK). The assets, java, jni, libs (for fmod.so, not the same as the one with the jars), and res directories are at app/src/main.

In the project Gradle file, just change the classpath to use the experimental plugin. This file is located at the root of my project.

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle-experimental:0.7.2'
}
}

allprojects {
repositories {
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
Below is the app module gradle file, which is the big one. I also have an exec block at the top that launches a script to process the resources in my project before they get packaged into the apk.

apply plugin: 'com.android.model.application'

exec {
commandLine = "${file("../../../workspace-global/prebuild.sh")}".toString()
}

model {
repositories {
libs(PrebuiltLibraries) {
vrappframework {
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("../../ovr_sdk_mobile_1.0.3/VrAppFramework/Libs/Android/armeabi-v7a/libvrappframework.a")
}
}
ovrplatform {
headers.srcDir "../../ovr_sdk_platform/Include"
binaries.withType(SharedLibraryBinary) {
sharedLibraryFile = file("../../ovr_sdk_platform/Android/libs/armeabi-v7a/libovrplatform.so")
}
}
oculusp2p {
headers.srcDir "../../ovr_sdk_platform/Include"
binaries.withType(SharedLibraryBinary) {
sharedLibraryFile = file("../../ovr_sdk_platform/Android/libs/armeabi-v7a/liboculus_p2p.so")
}
}
vrapi {
binaries.withType(SharedLibraryBinary) {
sharedLibraryFile = file("../../ovr_sdk_mobile_1.0.3/VrApi/Libs/Android/armeabi-v7a/libvrapi.so")
}
}
}
}

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"

ndk {
moduleName "mymodule"
toolchainVersion "4.9"
platformVersion 23
cppFlags.addAll(["-std=c++11",
"-D__ANDROID__=1", "-D__OCULUS__=1", "-DANDROID=1",
"-fexceptions", "-Werror", "-fvisibility=default", // "-fno-rtti"
"-I${file("../../ovr_sdk_mobile_1.0.3/1stParty/OpenGL_Loader/Include/")}".toString(),
"-I${file("../../ovr_sdk_mobile_1.0.3/VrAppSupport/SystemUtils/Include/")}".toString(),
"-I${file("../../ovr_sdk_mobile_1.0.3/VrAppSupport/VrGUI/Src/")}".toString(),
"-I${file("../../ovr_sdk_mobile_1.0.3/VrAppSupport/VrLocale/Src/")}".toString(),
"-I${file("../../ovr_sdk_mobile_1.0.3/VrApi/Include")}".toString(),
"-I${file("../../ovr_sdk_mobile_1.0.3/VrAppFramework/Include")}".toString(),
"-I${file("../../ovr_sdk_mobile_1.0.3/LibOVRKernel/Src")}".toString(),
"-I${file("../../ovr_sdk_mobile_1.0.3/Include")}".toString(),
"-I${file("../../ovr_sdk_platform/Include")}".toString(),
"-I${file("../../freeimage/jni/Source")}".toString(),
"-I${file("../../fmod/api/lowlevel/inc")}".toString(),
"-I${file("../../keyczar")}".toString(),
"-I${file("./src/main/jni")}".toString(),
"-I${file("../../openssl/include")}".toString(),
"-I${file("../../freetype/Android/include/freetype2")}".toString()
])
ldLibs.addAll(["log", "GLESv3", "jnigraphics", "android", "EGL",
"${file("../../ovr_sdk_mobile_1.0.3/3rdParty/stb/lib/android/armeabi-v7a/libstb.a")}".toString(),
"${file("../../ovr_sdk_mobile_1.0.3/3rdParty/minizip/lib/android/armeabi-v7a/libminizip.a")}".toString(),
"${file("../../fmod/api/lowlevel/lib/armeabi-v7a/libfmod.so")}".toString(),
"${file("../../ovr_sdk_mobile_1.0.3/VrApi/Libs/Android/armeabi-v7a/libvrapi.so")}".toString(),
"${file("../../freeimage/obj/local/armeabi-v7a/libFreeImage.a")}".toString(),
"${file("../../freetype/Android/lib/libfreetype.a")}".toString(),
"${file("../../ovr_sdk_mobile_1.0.3/VrAppSupport/SystemUtils/Libs/Android/armeabi-v7a/libsystemutils.a")}".toString(),
"${file("../../ovr_sdk_mobile_1.0.3/VrAppFramework/Libs/Android/armeabi-v7a/libvrappframework.a")}".toString(),
"${file("../../ovr_sdk_mobile_1.0.3/LibOVRKernel/Libs/Android/armeabi-v7a/libovrkernel.a")}".toString(),
])
abiFilters.add("armeabi-v7a")
stl "c++_static"
}

defaultConfig {
applicationId "com.myappid"
minSdkVersion.apiLevel 19
targetSdkVersion.apiLevel 23
versionCode 12
versionName "0.01"
}
}

android.sources.main {
jni {
source {
srcDirs = ['src/main/jni']
}
dependencies {
library "vrapi" linkage "shared"
library "vrappframework" linkage "static"
library "ovrplatform" linkage "shared"
library "oculusp2p" linkage "shared"
}
}
jniLibs {
source {
srcDir 'src/main/libs'
}
dependencies {
library "ovrplatform"
library "oculusp2p"
}
}

res {
source {
srcDir 'src/main/res'
}
}

assets {
source {
srcDir 'src/main/assets'
}
}

}

android.buildTypes {
release {
shrinkResources true
useProguard true
proguardFiles.add(file('proguard-rules.pro'))
}
debug {
ndk {
cppFlags.addAll(["-D_DEBUG=1"])
}
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
}


cloudscreensvr
Honored Guest
Thank you for these, I'll go through them and see if I can adapt them to the video player app.

Mitnainartinari
Protege
Let me know if you get it working. I'd like to see it if you do. There's a fix in a beta version of Android Studio for a debugging problem I was having. The Attach to Android Process feature for NDK debugging wasn't working for me, when the app is launched without initially running the debugger (it was working for the Java part), and I really needed it for a serious bug that would pop up very rarely and that I still don't know how to reproduce. Now that I can get Attach to Process working I'm waiting for the bug to pop up again, so I can try it out. If you need Attach to Process to work with the hybrid debugger/C++ code, you can download Android Studio 2.2 beta 2, and download LLDB 2.2 (you'll need to enable the Canary/Dev channel for LLDB 2.2 to show up in the SDK manager). Then just do the regular Attach To Process command and it should work fine. So far I haven't had any problems with AS 2.2.

KouTsuneka
Explorer
i create a project from VrTemplate (name as OculusDebug)
Move every files in (Projects\Android) same level as project folder (OculusDebug)
Move cpp, h files from Src to jni
Edit Android.mk and Application.mk (as below) -- i don't if this neccessary.
Edit setting.gradle rootProject.projectDir
Correct dirs in build.gradle

// build.gradle
 apply plugin: 'com.android.application'
 apply from: "${rootProject.projectDir}/VrApp.gradle"

 dependencies {
   compile project(':VrAppFramework:Projects:AndroidPrebuilt')
   compile project(':VrAppSupport:SystemUtils:Projects:AndroidPrebuilt')
   compile project(':VrAppSupport:VrGUI:Projects:AndroidPrebuilt')
   compile project(':VrAppSupport:VrLocale:Projects:AndroidPrebuilt')
   compile project(':VrAppSupport:VrSound:Projects:AndroidPrebuilt')
 }

 android {
   project.archivesBaseName = "OculusDebug"

   defaultConfig {
     applicationId "com.KouTsuneka.OculusDebug"
   }

   compileSdkVersion 19
   buildToolsVersion '23.0.1'

   sourceSets {
     main {
       manifest.srcFile 'AndroidManifest.xml'
       java.srcDirs = ['java']
       jniLibs.srcDir 'libs'
       res.srcDirs = ['res']
       assets.srcDirs = ['assets']
     }
   }
 }
// settings.gradle
rootProject.projectDir = new File(settingsDir, '../../..')
rootProject.name = "OculusDebug"

include ':', \
'VrApi:Projects:AndroidPrebuilt', \
'VrAppFramework:Projects:AndroidPrebuilt', \
'VrAppSupport:VrLocale:Projects:AndroidPrebuilt', \
'VrAppSupport:VrSound:Projects:AndroidPrebuilt', \
'VrSamples:Native:OculusDebug:Projects:Android', \
'VrAppSupport:SystemUtils:Projects:AndroidPrebuilt', \
'VrAppSupport:VrGUI:Projects:AndroidPrebuilt'

// Android.mk
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_CFLAGS := -DANDROID_NDK
LOCAL_CFLAGS += -Werror
LOCAL_CFLAGS += -Wall
LOCAL_CFLAGS += -Wextra
#LOCAL_CFLAGS += -Wlogical-op
#LOCAL_CFLAGS += -Weffc++
LOCAL_CFLAGS += -Wno-strict-aliasing
LOCAL_CFLAGS += -Wno-unused-parameter
LOCAL_CFLAGS += -Wno-missing-field-initializers
LOCAL_CFLAGS += -Wno-multichar
LOCAL_CPPFLAGS := -Wno-type-limits
LOCAL_CPPFLAGS += -Wno-invalid-offsetof
LOCAL_CPPFLAGS += -std=c++11

LOCAL_CFLAGS += -Wno-error=deprecated-declarations

ifeq ($(OVR_DEBUG),1)
  LOCAL_CFLAGS += -DOVR_BUILD_DEBUG=1 -O0 -g
else
  LOCAL_CFLAGS += -O3
endif

LOCAL_ARM_MODE := arm


LOCAL_MODULE := ovrapp
LOCAL_SRC_FILES := OvrApp.cpp
LOCAL_STATIC_LIBRARIES := vrsound vrmodel vrlocale vrgui vrappframework systemutils libovrkernel
LOCAL_SHARED_LIBRARIES := vrapi

include $(BUILD_SHARED_LIBRARY)

$(call import-module,LibOVRKernel/Projects/AndroidPrebuilt/jni)
$(call import-module,VrApi/Projects/AndroidPrebuilt/jni)
$(call import-module,VrAppSupport/SystemUtils/Projects/AndroidPrebuilt/jni)
$(call import-module,VrAppFramework/Projects/AndroidPrebuilt/jni)
$(call import-module,VrAppSupport/VrGUI/Projects/AndroidPrebuilt/jni)
$(call import-module,VrAppSupport/VrLocale/Projects/AndroidPrebuilt/jni)
$(call import-module,VrAppSupport/VrModel/Projects/AndroidPrebuilt/jni)
$(call import-module,VrAppSupport/VrSound/Projects/AndroidPrebuilt/jni
// Application.mk
APP_PLATFORM := android-19
APP_ABI := armeabi-v7a
APP_STL := gnustl_static
APP_LDFLAGS := -Wl,--build-id
NDK_TOOLCHAIN_VERSION := 4.9
ROOT_DIR := F:/ovr_sdk_mobile_1.0.3
NDK_MODULE_PATH := $(ROOT_DIR)

VrSamples\Native\OculusDebug
├───assets
│   └───oculussig_xXXxXxXXXxxxXxXXXxx
├───build
├───gradle
│   └───wrapper
├───java
│   └───oculus
├───jni
│   └───Android.mk
│   └───Application.mk
│   └───OvrApp.cpp
│   └───OvrApp.h
├───libs
│   └───armeabi-v7a
│       └───gdb.setup
│       └───gdbserver
│       └───libovrapp.so
│       └───libvrapi.so
├───obj
│   └───local
│       └───armeabi-v7a (put this in symbol directories)
│           └───objs-debug
│               └───ovrapp
│                  └───OvrApp.o
│                  └───OvrApp.o.d
│           └───libovrapp.so
│           └───libvrapi.so
└───res

i don't know where the issues first place ... but with this set up debugger works 
(it also genrate a Native-OculusDebug configuration)
Android Studio 2.2
NDK r11c
Gradle 2.14.1
Gradle Plugin 2.2.0
jdk1.8.0_91

r_teslenko
Honored Guest
Somehow configuration with gradle android plugin 2.2.0 and gradle version 2.14.1 produces Error:Cannot invoke method dependsOn() on null object while trying to link c++ code to the project in Android Studio v. 2.2. Problem is on line 267 VrApp.gradle file in the ovr_mobile_sdk root folder. Does any one know how to solve this issue?

shalin186
Honored Guest
Is anyone successfully able to navigate and debug thru native C++ code. I followed Mitnainartinarian example of using experimental gradle and with that I can navigate thru C++ code. but I still can not insert the break points. Moreover, i don't see .so file being updated when i change my C++ code. Right now, I am just trying to enable this on 360VideosSDK example. Does anyone have any suggestions? Here's my build.gradle file.

apply plugin: 'com.android.model.application'

model {
repositories {
libs(PrebuiltLibraries) {
libovrkernel {
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("../../../../../../ovr_sdk_mobile_1.0.3/LibOVRKernel/Libs/Android/armeabi-v7a/libovrkernel.a")
}
}
vrappframework {
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("../../../../../../ovr_sdk_mobile_1.0.3/VrAppFramework/Libs/Android/armeabi-v7a/libvrappframework.a")
}
}
systemutils {
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("../../../../../../ovr_sdk_mobile_1.0.3/VrAppSupport/SystemUtils/Libs/Android/armeabi-v7a/libsystemutils.a")
}
}
vrgui {
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("../../../../../../ovr_sdk_mobile_1.0.3/VrAppSupport/VrGUI/Libs/Android/armeabi-v7a/libvrgui.a")
}
}

vrlocale {
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("../../../../../../ovr_sdk_mobile_1.0.3/VrAppSupport/VrLocale/Libs/Android/armeabi-v7a/libvrlocale.a")
}
}

vrsound {
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("../../../../../../ovr_sdk_mobile_1.0.3/VrAppSupport/VrSound/Libs/Android/armeabi-v7a/libvrsound.a")
}
}

stb {
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("../../../../../../ovr_sdk_mobile_1.0.3/3rdParty/stb/lib/android/armeabi-v7a/libstb.a")
}
}

minizip {
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("../../../../../../ovr_sdk_mobile_1.0.3/3rdParty/stb/lib/android/armeabi-v7a/libminizip.a")
}
}

jpeg {
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("../../../../../../ovr_sdk_mobile_1.0.3/VrSamples/Native/Oculus360PhotosSDK/Projects/Android/jni/libjpeg.a")
}
}

openglloader {
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("../../../../../../ovr_sdk_mobile_1.0.3/1stParty/OpenGL_Loader/Libs/Android/armeabi-v7a/libopenglloader.a")
}
}
vrapi {
binaries.withType(SharedLibraryBinary) {
sharedLibraryFile = file("../../../../../../ovr_sdk_mobile_1.0.3/VrApi/Libs/Android/armeabi-v7a/libvrapi.so")
}
}
oculus360videos {
binaries.withType(SharedLibraryBinary) {
sharedLibraryFile = file("../../../../../../ovr_sdk_mobile_1.0.3/VrSamples/Native/Oculus360VideosSDK/Projects/Android/libs/armeabi-v7a/liboculus360videos.so")
}
}

}
}

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

ndk {
moduleName "oculus360videos"
toolchainVersion "4.9"
platformVersion 23
cppFlags.addAll(["-std=c++11",
"-D__ANDROID__=1", "-D__OCULUS__=1", "-DANDROID=1", "-DANDROID_NDK",
"-fexceptions", "-Werror", "-fvisibility=default", // "-fno-rtti"
"-I${file("../../../../../../ovr_sdk_mobile_1.0.3/1stParty/OpenGL_Loader/Include/")}".toString(),
"-I${file("../../../../../../ovr_sdk_mobile_1.0.3/1stParty/OpenGL_Loader/Src/")}".toString(),
"-I${file("../../../../../../ovr_sdk_mobile_1.0.3/3rdParty/stb/src/")}".toString(),
"-I${file("../../../../../../ovr_sdk_mobile_1.0.3/3rdParty/minizip/src/")}".toString(),
"-I${file("../../../../../../ovr_sdk_mobile_1.0.3/VrAppSupport/SystemUtils/Include/")}".toString(),
"-I${file("../../../../../../ovr_sdk_mobile_1.0.3/VrAppSupport/VrGUI/Src/")}".toString(),
"-I${file("../../../../../../ovr_sdk_mobile_1.0.3/VrAppSupport/VrLocale/Src/")}".toString(),
"-I${file("../../../../../../ovr_sdk_mobile_1.0.3/VrAppSupport/VrLocale/Include/")}".toString(),
"-I${file("../../../../../../ovr_sdk_mobile_1.0.3/VrAppSupport/VrSound/Src/")}".toString(),
"-I${file("../../../../../../ovr_sdk_mobile_1.0.3/VrAppSupport/VrSound/Include/")}".toString(),
"-I${file("../../../../../../ovr_sdk_mobile_1.0.3/VrAppSupport/VrModel/Src/")}".toString(),
"-I${file("../../../../../../ovr_sdk_mobile_1.0.3/VrApi/Include")}".toString(),
"-I${file("../../../../../../ovr_sdk_mobile_1.0.3/VrAppFramework/Include")}".toString(),
"-I${file("../../../../../../ovr_sdk_mobile_1.0.3/VrAppFramework/Src")}".toString(),
"-I${file("../../../../../../ovr_sdk_mobile_1.0.3/VrSamples/Native/Oculus360PhotosSDK/Src")}".toString(),
"-I${file("../../../../../../ovr_sdk_mobile_1.0.3/VrSamples/Native/Oculus360VideosSDK/Src")}".toString(),
"-I${file("../../../../../../ovr_sdk_mobile_1.0.3/LibOVRKernel/Src")}".toString(),
"-I${file("../../Src")}".toString(),
])
ldLibs.addAll(["log", "GLESv3", "jnigraphics", "android", "EGL", "z",
"${file("../../../../../../ovr_sdk_mobile_1.0.3/1stParty/OpenGL_Loader/Libs/Android/armeabi-v7a/libopenglloader.a")}".toString(),
"${file("../../../../../../ovr_sdk_mobile_1.0.3/3rdParty/stb/lib/android/armeabi-v7a/libstb.a")}".toString(),
"${file("../../../../../../ovr_sdk_mobile_1.0.3/VrApi/Libs/Android/armeabi-v7a/libvrapi.so")}".toString(),
"${file("../../../../../../ovr_sdk_mobile_1.0.3/VrAppSupport/SystemUtils/Libs/Android/armeabi-v7a/libsystemutils.a")}".toString(),
"${file("../../../../../../ovr_sdk_mobile_1.0.3/VrAppSupport/VrGUI/Libs/Android/armeabi-v7a/libvrgui.a")}".toString(),
"${file("../../../../../../ovr_sdk_mobile_1.0.3/VrAppSupport/VrLocale/Libs/Android/armeabi-v7a/libvrlocale.a")}".toString(),
"${file("../../../../../../ovr_sdk_mobile_1.0.3/VrAppSupport/VrSound/Libs/Android/armeabi-v7a/libvrsound.a")}".toString(),
"${file("../../../../../../ovr_sdk_mobile_1.0.3/VrAppSupport/VrModel/Libs/Android/armeabi-v7a/libvrmodel.a")}".toString(),
"${file("../../../../../../ovr_sdk_mobile_1.0.3/VrAppFramework/Libs/Android/armeabi-v7a/libvrappframework.a")}".toString(),
"${file("../../../../../../ovr_sdk_mobile_1.0.3/VrSamples/Native/Oculus360PhotosSDK/Projects/Android/jni/libjpeg.a")}".toString(),
"${file("../../../../../../ovr_sdk_mobile_1.0.3/VrSamples/Native/Oculus360VideosSDK/Projects/Android/libs/armeabi-v7a/liboculus360videos.so")}".toString(),
"${file("../../../../../../ovr_sdk_mobile_1.0.3/3rdParty/minizip/lib/android/armeabi-v7a/libminizip.a")}".toString(),
"${file("../../../../../../ovr_sdk_mobile_1.0.3/LibOVRKernel/Libs/Android/armeabi-v7a/libovrkernel.a")}".toString(),
])
abiFilters.add("armeabi-v7a")
stl "stlport_static"
}

defaultConfig {
applicationId "com.oculus.oculus360videossdk"
minSdkVersion.apiLevel 19
targetSdkVersion.apiLevel 23
versionCode 12
versionName "0.01"
}
}

android.sources.main {

manifest.source {
srcDir '.'
include 'AndroidManifest.xml'
}

jni {
source {
srcDir '../../Src'
}
dependencies {
library "vrapi" linkage "shared"
library "vrappframework" linkage "static"
library "systemutils" linkage "static"
library "vrgui" linkage "static"
library "vrsound" linkage "static"
library "vrlocale" linkage "static"
library "libovrkernel" linkage "static"
library "jpeg" linkage "static"
library "openglloader" linkage "static"
}
}
jniLibs {
source {
srcDir 'libs'
}
dependencies {
library "vrapi"
library "oculus360videos"
library "vrappframework"
library "systemutils"
library "vrgui"
library "vrsound"
library "vrlocale"
library "libovrkernel"
library "jpeg"
library "openglloader"
}
}

java {
source {
srcDir '../../java'
}
}

res {
source {
srcDirs += "../../res"
srcDirs += "../../../../../../ovr_sdk_mobile_1.0.3/VrAppSupport/VrGUI/res"
}
}

assets {
source {
srcDir '../../assets'
}
}
}

android.buildTypes {
debug {
ndk {
cppFlags.addAll(["-D_DEBUG=1"])
}
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}

Mitnainartinari
Protege
Hi @shalin186, have you made sure you have LLDB 2.2/AS2.2? I wasn't able to get the breakpoints fully working properly with LLDB 2.1. Also, for your app-native configuration the debugger should be set to Hybrid. I also didn't have to set a path to the symbols files. I believe I tried specifying the path previously but I had problems, although I'm not sure if it was because I was specifying a path (whether it was correct or not), or if it was because of some other unrelated problem I had at the time. The version of the experimental plugin I'm using is com.android.tools.build:gradle-experimental:0.8.0.