Debugging C/C++ NDK library in AndroidStudio -


i having problem debugging c++ code in android studio. first bit setup:

  1. c++ source code stored in /tmp/pjsip directory, compiled standalone toolchain particular android target.
  2. resulting library passed through swig produces libpjsua2.so , has jnis available
  3. android project setup in directory , library step #2 copied app/src/main/jnilibs/armeabi-v7a directory , java jni code stored in app/src/main/java/org/pjsip/pjsua2 directory.

directory structure follows:

if debug android app code tracing ends in set of files stored under app/src/main/java/org/pjsip/pjsua2 directory java jnis code written in c/c++ are. can't debug , go further towards code in c/c++. that's problem. tried modifying android.mk , build.gradle files following hints on internet no luck far.

here content of android.mk file:

include ../../../../../build.mak local_path  := $(pjdir)/pjsip-apps/src/swig/java/android include $(clear_vars)  local_module    := libpjsua2 local_cflags    := $(app_cxxflags) -frtti -fexceptions local_ldflags   := $(app_ldxxflags) local_ldlibs    := $(app_ldxxlibs) #local_shared_libraries := $(app_ldxxlibs) local_src_files := ../output/pjsua2_wrap.cpp  include $(build_shared_library) 

and here content of build.gradle file:

apply plugin: 'com.android.model.application'  model {     android {         compilesdkversion = 23         buildtoolsversion = "23.0.3"          defaultconfig.with {             applicationid = "com.fortinet.fvuc.app"             minsdkversion.apilevel = 21             targetsdkversion.apilevel = 21             versioncode = 1             versionname = "1.0"         }     }      android.buildtypes {         release {             minifyenabled = false             proguardfiles.add(file('proguard-android.txt'));         }     }      android.ndk {        modulename = "libpjsua2"     }  }   dependencies {     compile filetree(dir: 'libs', include: ['*.jar'])     testcompile 'junit:junit:4.12'     compile 'com.android.support:appcompat-v7:23.1.0'     compile 'com.android.support:cardview-v7:23.1.0'     compile 'com.android.support:design:23.1.0'     compile 'com.android.support:support-v13:23.0.+'     compile 'com.intellij:annotations:+@jar' } 

build.gradle(main project) looks like:

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

how tell android studio source code can debug library written in c/c++?

thanks in advance!


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -