Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

library "libopencv_java.so" not found #14

Closed
imaNNeo opened this issue Feb 1, 2016 · 10 comments
Closed

library "libopencv_java.so" not found #14

imaNNeo opened this issue Feb 1, 2016 · 10 comments

Comments

@imaNNeo
Copy link

imaNNeo commented Feb 1, 2016

hi, i have this issue,
anyone can help me???
opencv E/linker: load_library(linker.cpp:759): library "libopencv_java.so" not found 02-01 22:00:18.204 11789-11789/com.neo.testopencv E/linker: soinfo_link_image(linker.cpp:1652): could not load library "libopencv_java.so" needed by "libopenalpr-native.so"; caused by load_library(linker.cpp:759): library "libopencv_java.so" not found 02-01 22:00:18.204 11789-11789/com.neo.testopencv E/dalvikvm: dlopen("/data/app-lib/com.neo.testopencv-1/libopenalpr-native.so") failed: Cannot load library: soinfo_link_image(linker.cpp:1652): could not load library "libopencv_java.so" needed by "libopenalpr-native.so"; caused by load_library(linker.cpp:759): library "libopencv_java.so" not found 02-01 22:00:18.209 11789-11789/com.neo.testopencv E/AndroidRuntime: FATAL EXCEPTION: main java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1652): could not load library "libopencv_java.so" needed by "libopenalpr-native.so"; caused by load_library(linker.cpp:759): library "libopencv_java.so" not found at java.lang.Runtime.loadLibrary(Runtime.java:372) at java.lang.System.loadLibrary(System.java:514) at org.openalpr.AlprJNIWrapper.<clinit>(AlprJNIWrapper.java:9) at org.openalpr.OpenALPR$Factory.create(OpenALPR.java:78) at com.neo.testopencv.MainActivity.onActivityResult(MainActivity.java:61) at android.app.Activity.dispatchActivityResult(Activity.java:5383) at android.app.ActivityThread.deliverResults(ActivityThread.java:3575) at android.app.ActivityThread.handleSendResult(ActivityThread.java:3622) at android.app.ActivityThread.access$1100(ActivityThread.java:169) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1436) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5433) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:924) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:691) at dalvik.system.NativeStart.main(Native Method)

@SandroMachado
Copy link
Owner

@imaNNeoFighT which device are you using?

@imaNNeo
Copy link
Author

imaNNeo commented Feb 2, 2016

huawei honor 3c u10,
of course i don't inistall openCv in my computer ,
it can related to this???

@SandroMachado
Copy link
Owner

No, you computer configuration is not related with this issue. Did you tried with the demo app at the releases tab?

@JerzyPuchalski
Copy link
Contributor

Seems this device is running Android 4.2 and according to this StackOverflow answer it might be needed to additionally load opencv library explicitly.

@SandroMachado
Copy link
Owner

Yeah, that could be the issue. At this moment I am only loading the openalpr-native module.

@imaNNeo
Copy link
Author

imaNNeo commented Feb 4, 2016

@SandroMachado i downloaded sample apk and when i take picture,
i get ForceClose.

@SandroMachado
Copy link
Owner

That is a known issue. At the second time it should work if is not related to any other missing configuration. Can you please test it again?

@SandroMachado
Copy link
Owner

Closed without support to reproduce.

@mercuriete
Copy link

I had the same issue:

it was fixed with this lines (the order is important):

        System.loadLibrary("lept");
        System.loadLibrary("tess");
        System.loadLibrary("opencv_java");

when you execute the app in android 4.2 and prior android cannot understand where are the libraries and you have to register it manually.

I put these lines in onCreate of MainActivity.

So this is a real bug because in gradle you said:

        minSdkVersion 16

if you want i can create a pull requet.

@SandroMachado
Copy link
Owner

@mercuriete can you please make the PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants