Android NDK: WARNING:jni/Android.mk: non-system libraries in linker flags: -lopencv_java3

android项目老是提示这个警告Android NDK: WARNING:jni/Android.mk:native_sample: non-system libraries in linker flags: -lopencv_java3
报错误
dlopen(“/data/app-lib/com.example.testc-1/libnative_sample.so”) failed: dlopen failed: could not load library “libopencv_java3.so” needed by “**.so”; caused by library “libopencv_java3.so” not found

解决办法,在Android.mk添加这样一句话
OPENCV_INSTALL_MODULES:=on
OPENCV_LIB_TYPE=STATIC

添加完成之后记得将项目clean一下再编译运行。

你可能感兴趣的:(Android)