1. 修改Android.mk
内容
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include /root/OpenCV_android/sdk/native/jni/OpenCV.mk
LOCAL_MODULE := hello-jni
LOCAL_SRC_FILES := hello-jni.c
include $(BUILD_SHARED_LIBRARY)
2. ADT 的Project->Properties->Builders->New新增
Location:增加如/root/ndk_r9_64/ndk-build
Working Directory:如${workspace_loc:/HelloJni}
jni/hello-jni.c
中有
#include "opencv/cv.h" .....
build OK***********************
Compile thumb : hello-jni <= hello-jni.c
SharedLibrary : libhello-jni.so
Install : libhello-jni.so => libs/armeabi/libhello-jni.so