What is the Log API to call from an Android JNI program?

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 

Leave a Comment