JimXiao / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

java.lang.UnsatisfiedLinkError: Couldn't load opencv_highgui findLibrary returned null #476

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. grabber.start();
2.
3.

What is the expected output? What do you see instead?
I want to record a video, but I can't even start the grabber

What version of the product are you using? On what operating system?
I am working on Android. 
I have these jars:
  - ffmpeg 2.2.1-0.8.jar
  - javacpp
  - javacv
  - opencv

I tired to add every jar from here: 
http://search.maven.org/#search%7Cga%7C1%7Cbytedeco
But it didn't change anything.

Please provide any additional information below.

//////////////////////////// CODE //////////////////////////////
Here is the code I launch:

public void record(){
        try {
            OpenCVFrameGrabber grabber = new OpenCVFrameGrabber(0);
            Log.d("GRABBER", grabber.toString());

            grabber.start();

        } catch (Exception e) {
            Log.d("GRABBER", e.toString());
            e.printStackTrace();
        }

    }

//////////////////////////// LOG ///////////////////////////////
Here is the logcat:

06-27 10:17:37.865: E/AndroidRuntime(4944): FATAL EXCEPTION: main
06-27 10:17:37.865: E/AndroidRuntime(4944): 
java.lang.ExceptionInInitializerError
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
org.bytedeco.javacv.OpenCVFrameGrabber.start(OpenCVFrameGrabber.java:174)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
fr.sogeti.authbio.demonstrateur.FdActivity.record(FdActivity.java:269)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
fr.sogeti.authbio.demonstrateur.FdActivity$1$1.onClick(FdActivity.java:52)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
android.view.View.performClick(View.java:4202)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
android.view.View$PerformClick.run(View.java:17340)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
android.os.Handler.handleCallback(Handler.java:725)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
android.os.Handler.dispatchMessage(Handler.java:92)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
android.os.Looper.loop(Looper.java:137)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
android.app.ActivityThread.main(ActivityThread.java:5039)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
java.lang.reflect.Method.invokeNative(Native Method)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
java.lang.reflect.Method.invoke(Method.java:511)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
dalvik.system.NativeStart.main(Native Method)
06-27 10:17:37.865: E/AndroidRuntime(4944): Caused by: 
java.lang.UnsatisfiedLinkError: Couldn't load jniopencv_highgui from loader 
dalvik.system.PathClassLoader[dexPath=/data/app/fr.sogeti.authbio.demonstrateur-
1.apk,libraryPath=/data/app-lib/fr.sogeti.authbio.demonstrateur-1]: findLibrary 
returned null
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
java.lang.Runtime.loadLibrary(Runtime.java:365)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
java.lang.System.loadLibrary(System.java:535)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:524)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
org.bytedeco.javacpp.Loader.load(Loader.java:399)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
org.bytedeco.javacpp.Loader.load(Loader.java:353)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
org.bytedeco.javacpp.opencv_highgui.<clinit>(opencv_highgui.java:13)
06-27 10:17:37.865: E/AndroidRuntime(4944):     ... 14 more
06-27 10:17:37.865: E/AndroidRuntime(4944): Caused by: 
java.lang.UnsatisfiedLinkError: Couldn't load opencv_highgui from loader 
dalvik.system.PathClassLoader[dexPath=/data/app/fr.sogeti.authbio.demonstrateur-
1.apk,libraryPath=/data/app-lib/fr.sogeti.authbio.demonstrateur-1]: findLibrary 
returned null
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
java.lang.Runtime.loadLibrary(Runtime.java:365)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
java.lang.System.loadLibrary(System.java:535)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:524)
06-27 10:17:37.865: E/AndroidRuntime(4944):     at 
org.bytedeco.javacpp.Loader.load(Loader.java:390)
06-27 10:17:37.865: E/AndroidRuntime(4944):     ... 16 more

////////////////////////////////////////////////////////

Original issue reported on code.google.com by TPlass...@gmail.com on 27 Jun 2014 at 8:32

GoogleCodeExporter commented 8 years ago
Please try to follow the instructions in the README file here:
https://github.com/bytedeco/javacv#quick-start-for-opencv-and-ffmpeg

Original comment by samuel.a...@gmail.com on 27 Jun 2014 at 11:11

GoogleCodeExporter commented 8 years ago
Please try again with JavaCV 0.9 and let us know if the problems still occurs, 
thanks!

Original comment by samuel.a...@gmail.com on 30 Jul 2014 at 11:22

GoogleCodeExporter commented 8 years ago
I followed the instructions in the README file with more attention and 
everything worked perfectly thanks !

Original comment by TPlass...@gmail.com on 30 Jul 2014 at 11:33

GoogleCodeExporter commented 8 years ago
Great! Thanks for your confirmation, enjoy!

And please use the issue system on GitHub next time, if possible, thanks.

Original comment by samuel.a...@gmail.com on 30 Jul 2014 at 11:34