侧边栏壁纸
博主头像
银河驿站博主等级

行动起来,活在当下

  • 累计撰写 85 篇文章
  • 累计创建 17 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

android平台JNI打印数据

Administrator
2021-07-22 / 0 评论 / 0 点赞 / 905 阅读 / 953 字

头文件引用

#include <android/log.h>
#define LOG_TAG "android_printf"

//日志等级
//ANDROID_LOG_DEBUG
//ANDROID_LOG_INFO  
//ANDROID_LOG_WARN  
//ANDROID_LOG_ERROR 
#define  LOGEE(...)  __android_log_print(ANDROID_LOG_INFO,LOG_TAG ,__VA_ARGS__)

#在CmakeLists.txt中添加
find_library( # Sets the name of the path variable.
              log-lib
	
              # Specifies the name of the NDK library that
              # you want CMake to locate.
              log )

target_link_libraries( # Specifies the target library.
                       native-lib

                       # Links the target library to the log library
                       # included in the NDK.
                       ${log-lib} )


0

评论区