1.)在项目根目录下创建jni目录,下面是要放进去的第一个文件Android.mkLOCAL_PATH:=$(callmy-dir)include$(CLEAR_VARS)LOCAL_MODULE:=main_jni#LOCAL_CFLAGS:=LOCAL_SRC_FILES:=main.cpp#LOCAL_LDLIBS:=include$(BUILD_SHARED_LIBRARY)2.)在jni目录创建main.cpp#includeusingnamespacestd;#ifdef__cplusplusextern"C"{#endif