Note that there are some explanatory texts on larger screens.

plurals
  1. POOpenCV Android initializing Mat crashing the application with unsatisfiedLinkedError
    text
    copied!<p>It seems like i am not able to use any of opencv variable or function it just crash with the following kind of error using only Mat outMat = new Mat(); this code when i am coding in java class.</p> <pre><code>Exception Ljava/lang/UnsatisfiedLinkError; thrown during Lorg/opencv/core/Mat 05-19 11:27:58.403: E/AndroidRuntime(890): FATAL EXCEPTION: main 05-19 11:27:58.403: E/AndroidRuntime(890): java.lang.ExceptionInInitializerError 05-19 11:27:58.403: E/AndroidRuntime(890): at com.android.ndkexample.FarhandkproActivity$1.onClick(FarhandkproActivity.java:60) 05-19 11:27:58.403: E/AndroidRuntime(890): at android.view.View.performClick(View.java:2408) 05-19 11:27:58.403: E/AndroidRuntime(890): at android.view.View$PerformClick.run(View.java:8816) 05-19 11:27:58.403: E/AndroidRuntime(890): at android.os.Handler.handleCallback(Handler.java:587) 05-19 11:27:58.403: E/AndroidRuntime(890): at android.os.Handler.dispatchMessage(Handler.java:92) 05-19 11:27:58.403: E/AndroidRuntime(890): at android.os.Looper.loop(Looper.java:123) 05-19 11:27:58.403: E/AndroidRuntime(890): at android.app.ActivityThread.main(ActivityThread.java:4627) 05-19 11:27:58.403: E/AndroidRuntime(890): at java.lang.reflect.Method.invokeNative(Native Method) 05-19 11:27:58.403: E/AndroidRuntime(890): at java.lang.reflect.Method.invoke(Method.java:521) 05-19 11:27:58.403: E/AndroidRuntime(890): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 05-19 11:27:58.403: E/AndroidRuntime(890): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 05-19 11:27:58.403: E/AndroidRuntime(890): at dalvik.system.NativeStart.main(Native Method) 05-19 11:27:58.403: E/AndroidRuntime(890): Caused by: java.lang.UnsatisfiedLinkError: Library opencv_java not found 05-19 11:27:58.403: E/AndroidRuntime(890): at java.lang.Runtime.loadLibrary(Runtime.java:461) 05-19 11:27:58.403: E/AndroidRuntime(890): at java.lang.System.loadLibrary(System.java:557) 05-19 11:27:58.403: E/AndroidRuntime(890): at org.opencv.core.Mat.&lt;clinit&gt;(Mat.java:2065) 05-19 11:27:58.403: E/AndroidRuntime(890): ... 12 more </code></pre> <p>I am using java ndk , ndk part successfully compile and gives the result even on the java. But when i call inside the java any of opencv function or variable it gives same kind of above error.</p> <p>I have added the opencv java library externally , it compiles perfect without any error...</p> <p>If i use library project by going in project properties->Android Then i have to add OpenCV 2.3 library project browsing the folder. Doing that Then it works fine and does not crash. But the size became like 14 MB and takes too much time to load. So instead of that i tried OpenCVAndroid jar file as an external library but using that gives me error.</p> <p>Kindly help because i spent 2-3 hours but not able to solve it. I am not interested large size due to the library project addition. </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