打开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