Ask Your Question

Revision history [back]

libopencv_java cannot be loaded anymore

Hello! I have a strange issue. I am using android-ndk-r9c and OpenCV 2.4.8 on Mac. I developed an application and tested it on Samsung Galaxy Note. When I tried to run on Nexus 4, the "Couldn't load opencv_java: findLibrary returned null" appeared. I tried many things but it seems that "OPENCV_INSTALL_MODULES:=on" does not integrate OpenCV into my app. I was following these instructions. After some googling and changing some things and reverting back I discovered that the same error is issued also when I tried to run again on the Galaxy Note... So now my app is not running anywhere, neither on emulator. I am desperate. Your help is highly appreciated!! Thank you!!!

Android.mk :

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

OPENCV_INSTALL_MODULES:=on

include /Users/user/Tihomir/CPP_libs/OpenCV-2.4.8-android-sdk/sdk/native/jni/OpenCV.mk

LOCAL_SHARED_LIBRARIES := opencv_java

LOCAL_MODULE := operations

LOCAL_LDLIBS += -llog

LOCAL_SRC_FILES := operations.cpp

include $(BUILD_SHARED_LIBRARY)

and respectively, Application.mk :

APP_STL := gnustl_shared

APP_CPPFLAGS := -frtti -fexceptions

APP_ABI := all