Background
I’m writing application for android, using Eclipse in Windows. I’m implementing C code in JAVA and for that I’m using JNI. I have many functions and my problem is that I want to debug functions in JNI.
Question
Can I debug my code which is written in JNI in C language ?
Here is answer How to start logging for Android NDK !
Some weeks I was researching how I can write logs in Eclipse from Android NDK code. I found some examples in Internet and want to share it with you. Following steps below you can start logging on Eclipse.
Include log.h file into your Android NDK source file
Add the line below to your Android.mk make file.
Now you can start logging, this two steps allows you to write logs in Eclipse from Android NDK. Write the line below in your Android NDK code and the log will bw appear in the Eclipse
use following Flags to write logs in the column which you want.
For example if you want to write in Info column you must write
So, Good Luck !