LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := your_module_name LOCAL_SRC_FILES := your_cpp_file.cpp LOCAL_C_INCLUDES := $(LOCAL_PATH)/your_header_file.h LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog
include $(BUILD_SHARED_LIBRARY)
#include "your_header_file.h"
static { System.loadLibrary("your_lib_name"); }
现在您可以在Java代码中使用您的C++库了!