Ask Your Question

tihomirski's profile - activity

2014-03-16 11:16:46 -0600 commented answer libopencv_java cannot be loaded anymore

Thank you!! I see in Eclipse that libopencv_java is not copied to /libs. And my liboperations is copied instead.

Any way. Now my problem is different. Somehow "OPENCV_INSTALL_MODULES:=on" started to copy libopencv_java in /libs but when I put this line in Android.mk, there are errors from my liboperations which come from OpenCV and not from my code. Here is one:

/Users/user/Android_NDK/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/objs/operations/operations.o: in function cv::Mat::release():/Users/user/Tihomir/CPP_libs/OpenCV-2.4.8-android-sdk/sdk/native/jni/include/opencv2/core/mat.hpp:367: error: undefined reference to 'cv::Mat::deallocate()'

2014-03-15 22:26:38 -0600 asked a question 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