08-17-2016 04:34 AM
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
08-18-2016 08:13 AM
08-18-2016 09:06 AM
08-18-2016 12:56 PM
app/
-libs/ (for jars)
-src/
--main/
---assets/
---java/com/...
---jni/
---res/...
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle-experimental:0.7.2'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
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'
}
08-19-2016 04:12 AM
08-19-2016 07:58 AM
09-27-2016 05:22 PM
09-29-2016 08:54 AM
10-21-2016 11:54 AM
10-22-2016 07:47 AM