android log

来源:互联网 发布:手机屏幕唤醒软件 编辑:程序博客网 时间:2024/05/17 02:56

打开Native层的LOGV,只需要在你的cpp代码前加上

#define LOG_NDEBUG 0

由源代码可以得到原因,源码目录/system/core/include/cutils/log.h 
可以看到注释
/* * Normally we strip LOGV (VERBOSE messages) from release builds. * You can modify this (for example with "#define LOG_NDEBUG 0" * at the top of your source file) to change that behavior. */#ifndef LOG_NDEBUG#ifdef NDEBUG#define LOG_NDEBUG 1#else#define LOG_NDEBUG 0#endif#endif