/*
* JNILog.h
*
*/
#ifndef JNILOG_H_
#define JNILOG_H_
#include <android/log.h>
extern "C"
{
//发布时请注释
#define __LOG_ON__
//发布时请注释end
#ifdef __LOG_ON__
//#define JNILOGE(...) __android_log_print(ANDROID_LOG_ERROR, "JNI", __VA_ARGS__)
//#define JNILOGD(...) __android_log_print(ANDROID_LOG_DEBUG, "JNI", __VA_ARGS__)
//#define JNILOGW(...) __android_log_print(ANDROID_LOG_WARN, "JNI", __VA_ARGS__)
//#define JNILOGI(...) __android_log_print(ANDROID_LOG_INFO, "JNI", __VA_ARGS__)
//#else
#define JNILOGE(...)
#define JNILOGD(...)
#define JNILOGW(...)
#define JNILOGI(...)
#endif
void my_free(void *p);
void* my_malloc(int size);
}
#endif /* JNILOG_H_ */
发布时,保持目前状态即可,调试时,将defin JNILOGE的注释打开