I would like to debug a JNI C application by inserting log messages to logcat. What is the C API that does this?
Like this:
#include <android/log.h> __android_log_write(ANDROID_LOG_ERROR, "Tag", "Error here");//Or ANDROID_LOG_INFO, ...
Add it to your makefile like this:
LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog
1.4m articles
1.4m replys
5 comments
57.0k users