If # include <utils/Log is used in the c file of JNI. h> compile with NDK. The error "error: utils/Log" is returned when ndk-build clean & ndk-build. h: No such file or directory if you only use LOG function 1 to modify Android. mk file configuration, add the following statement LOCAL_LDLIBS + =-L $ (SYSROOT)/usr/lib-llog 2 in. in file c, modify it to the following statement // # include <utils/Log. h> // close this line # include <ALog. h> // Add some rows. 3 ALog. the content of the h file is as follows: [cpp] # pragma once # include <android/log. h> # define LOG_TAG "debug log" # define LOGI (fmt, args ...) _ android _ Log_print (ANDROID_LOG_INFO, LOG_TAG, fmt, ## args) # define LOGD (fmt, args ...) _ android_log_print (ANDROID_LOG_DEBUG, LOG_TAG, fmt, ## args) # define LOGE (fmt, args ...) _ android_log_print (ANDROID_LOG_ERROR, LOG_TAG, fmt, # args) 4 ---- You can use Log output information, which is the same as the Log at the Java layer. iLOGI ("jni android log !!!! ") LOGD (" the string is: % s \ n ", strMsg); LOGE (strerror (errno ))