getting unsatisfiedLinkerror while trying to re-use opencv-facedection sample
I am trying to use openCV in android. So I am following the link - http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html
My basic intenstion is to create my own Android project and copying all the OpenCV Sample - face-detection sample source code to the new project and test the same to verify the android project setup.
I created an android project XYZ and then added the openCV library, then copied the jni directory from OpenCV Sample - face-detection to XYZ project and then trigger http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/android_dev_intro.html#cdt-builder
which generate a armeabi-v7a directory inside lib folder. Then I copied all the sourcecode from sample to xyz and run and then I found the following error-
java.lang.UnsatisfiedLinkError: Native method not found:
com.example.emotiondetector.DetectionBasedTracker.nativeCreateObject:(Ljava/lang/String;I) at com.example.emotiondetector.DetectionBasedTracker.nativeCreateObject(Native Method)
at com.example.emotiondetector.DetectionBasedTracker.<init> com.example.emotiondetector.FdView.<init>(FdView.java:146)
Means jni didnt work properly. Can anyone suggest where did I miss the core thing ?
Following warning came while generating jni-
C:\android-ndk-r9-windows-x86_64\android-ndk-r9\ndk-build.cmd Android NDK: WARNING:jni/Android.mk:detection_based_tracker: non-system libraries in linker flags: -lopencv_java Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the Android NDK:
current module Install : libdetection_based_tracker.so => libs/armeabi-v7a/libdetection_based_tracker.so
AFter quick search I found its a popular problem-
"java.lang.UnsatisfiedLinkError: Native method not found: com.test.camera.DetectionBasedTracker.nativeCreateObject:(Ljava/lang/String;I)J", FdView.java ->
But couldnt get any solution ...