Note that there are some explanatory texts on larger screens.

plurals
  1. POFace recognition using opencv
    text
    copied!<p>I am facing problem with opencv in android. I tried a lot searching in google and also try to debug .But not able to figure out the solution. Here is hte logcat file:</p> <pre><code>06-27 16:52:41.423: E/AndroidRuntime(6974): FATAL EXCEPTION: main 06-27 16:52:41.423: E/AndroidRuntime(6974): java.lang.UnsatisfiedLinkError: Couldn't load native_sample: findLibrary returned null 06-27 16:52:41.423: E/AndroidRuntime(6974): at java.lang.Runtime.loadLibrary(Runtime.java:365) 06-27 16:52:41.423: E/AndroidRuntime(6974): at java.lang.System.loadLibrary(System.java:535) 06-27 16:52:41.423: E/AndroidRuntime(6974): at org.opencv.face.Sample3Native$1.onManagerConnected(Sample3Native.java:83) 06-27 16:52:41.423: E/AndroidRuntime(6974): at org.opencv.android.AsyncServiceHelper$1.onServiceConnected(AsyncServiceHelper.java:314) 06-27 16:52:41.423: E/AndroidRuntime(6974): at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1068) 06-27 16:52:41.423: E/AndroidRuntime(6974): at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1085) 06-27 16:52:41.423: E/AndroidRuntime(6974): at android.os.Handler.handleCallback(Handler.java:605) 06-27 16:52:41.423: E/AndroidRuntime(6974): at android.os.Handler.dispatchMessage(Handler.java:92) 06-27 16:52:41.423: E/AndroidRuntime(6974): at android.os.Looper.loop(Looper.java:137) 06-27 16:52:41.423: E/AndroidRuntime(6974): at android.app.ActivityThread.main(ActivityThread.java:4441) 06-27 16:52:41.423: E/AndroidRuntime(6974): at java.lang.reflect.Method.invokeNative(Native Method) 06-27 16:52:41.423: E/AndroidRuntime(6974): at java.lang.reflect.Method.invoke(Method.java:511) 06-27 16:52:41.423: E/AndroidRuntime(6974): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823) 06-27 16:52:41.423: E/AndroidRuntime(6974): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590) 06-27 16:52:41.423: E/AndroidRuntime(6974): at dalvik.system.NativeStart.main(Native Method) </code></pre> <p>I can say that the problem is in loading the native_sample library. But don't have any solution. I am getting error in the following line:</p> <pre><code>// Load native library after(!) OpenCV initialization System.loadLibrary("native_sample"); </code></pre> <p>Here is my android.mk file :</p> <pre><code>LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) include ../../sdk/native/jni/OpenCV.mk LOCAL_MODULE := native_sample LOCAL_SRC_FILES := jni_part.cpp LOCAL_LDLIBS += -llog -ldl include $(BUILD_SHARED_LIBRARY) </code></pre> <p>And here is my application.mk file:</p> <pre><code>APP_STL := gnustl_static APP_CPPFLAGS := -frtti -fexceptions APP_ABI := armeabi </code></pre> <p>Here is my console output:</p> <pre><code>**** Build of configuration Default for project Face Recognition_opencv **** D:\NDK\android-ndk-r8e-windows-x86\android-ndk-r8e\ndk-build.cmd "Compile++ thumb : native_sample &lt;= jni_part.cpp SharedLibrary : libnative_sample.so Install : libnative_sample.so =&gt; libs/armeabi/libnative_sample.so **** Build Finished **** </code></pre> <p>And my bin file is not generating. That's i am getting error in <code>"setContentView(R.layout.activity_main);"</code> here in "R" . </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload