Monday, January 12, 2015

Error: Couldn't load opencv_java from loader...

Build Android system app that requires opencv library could result in this opencv library loading error. One way to get around this is to build the shared library with the app. Here is the snippet of Android.mk that define the opencv_java module
...
include $(CLEAR_VARS)
LOCAL_MODULE    := libopencv_java
LOCAL_SRC_FILES := libs/armeabi/libopencv_java.so
include $(BUILD_PREBUILT)
...
To build the prebuilt library into system, include $(BUILD_PREBUILT) instead of $(PREBUILT_SHARED_LIBRARY). I tried the latter, the system still could locate the opencv library files.

No comments:

Post a Comment