Android JNI LOG 打印

  • 代码如下:

#include "jni.h"
#include "android/log.h"

// debug log
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
// info log
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)

// 上面的是 debug log 里面能看到。
// 下面的是在 Androidstudio 里面能看到
  • 如下:

原文地址:https://www.cnblogs.com/chenfulin5/p/12880653.html