#include <stdio.h> #include <android/log.h> int main(void) { int a = 0x10,b = 0x20; __android_log_print(ANDROID_LOG_DEBUG,"hepu_alg"," This is a Debug Info.a = 0x%x b = 0x%x ",a,b); return 0; }
Android.mk文件
LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_CFLAGS += -fno-strict-aliasing -O2 -DNDEBUG -pie -mfloat-abi=softfp -mfpu=neon LOCAL_ARM_NEON := true LOCAL_DISABLE_FATAL_LINKER_WARNINGS=true LOCAL_C_INCLUDES += -I include/ LOCAL_LDLIBS := -llog SOURCES:=$(wildcard *.c) LOCAL_SRC_FILES := $(SOURCES) LOCAL_MODULE:= app include $(BUILD_EXECUTABLE)