Per the link http://ph0b.com/new-android-studio-ndk-support/ see sub heading "Using Android.mk/Application.mk", the article claims that one can use Android Studio for editting AND debugging. I have followed all the instructions per that article, but the debugger never seems to hit the breakpoint. Has this worked for anyone?
Some more info
My setup
- Android Studio 1.4
- Gradle 2.6
- Android Gradle plugin 0.3.0-alpha5
My build.gradle looks like this
apply plugin: 'com.android.model.application'
model { android { compileSdkVersion = 21 buildToolsVersion = "23.0.0 rc2"
defaultConfig.with { applicationId = "blah.blah1.com.blah3" minSdkVersion.apiLevel = 21 targetSdkVersion.apiLevel = 22 versionCode = 1 versionName = "1.0" } } android.buildTypes { release { minifyEnabled = false } } android.ndk { moduleName = "blahPlayer" ldLibs = ["log"] cppFlags += "-std=c++11" cppFlags += "-I${blahRoot}".toString() stl = "gnustl_shared" } android.sources { main.jni { source { srcDirs = ['src/main/none'] } } main.jniLibs { source { srcDirs = ['src/main/libs'] } } } android.productFlavors { create("arm") { ndk.with { abiFilters += "armeabi-v7a" } } }
}
My native source is split between sources in app/src/jni and also in a different location of the FS (as some source is third party)
- Code completion works fine ( I am able to include and use the source in third party source)
- I build all native sources using Android.mk and Application.mk and ndk-build externally. The SO files are generated under jniLibs and the app runs fine
When I set a breakpoint in the native source either under app/src/jni or the third party source location, debugger never hits them.