我编译face-recognition并成功在LG Leon(armv7I)上运行。当我在具有类似CPU架构的MyPhone UNO上安装应用程序(armv7I)时,会出现以下错误:
06-03 22:09:41.538 30619-30619/org.opencv.javacv.facerecognition E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.opencv.javacv.facerecognition, PID: 30619
java.lang.UnsatisfiedLinkError: dlopen failed: library "../../lib/libtbb.so" not found
at java.lang.Runtime.loadLibrary(Runtime.java:372)
at java.lang.System.loadLibrary(System.java:1076)
at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:593)
at com.googlecode.javacpp.Loader.load(Loader.java:489)
at com.googlecode.javacpp.Loader.load(Loader.java:431)
at com.googlecode.javacv.cpp.opencv_core.<clinit>(opencv_core.java:136)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at com.googlecode.javacpp.Loader.load(Loader.java:453)
at com.googlecode.javacv.cpp.opencv_imgproc.<clinit>(opencv_imgproc.java:97)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at com.googlecode.javacpp.Loader.load(Loader.java:453)
at com.googlecode.javacv.cpp.opencv_highgui.<clinit>(opencv_highgui.java:85)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at com.googlecode.javacpp.Loader.load(Loader.java:453)
at com.googlecode.javacv.cpp.opencv_calib3d.<clinit>(opencv_calib3d.java:94)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at com.googlecode.javacpp.Loader.load(Loader.java:453)
at com.googlecode.javacv.cpp.opencv_contrib.<clinit>(opencv_contrib.java:104)
at org.opencv.javacv.facerecognition.PersonRecognizer.<init>(PersonRecognizer.java:44)
at org.opencv.javacv.facerecognition.FdActivity$1.onManagerConnected(FdActivity.java:109)
at org.opencv.android.AsyncServiceHelper$3.onServiceConnected(AsyncServiceHelper.java:320)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1223)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1240)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "../../lib/libtbb.so" not found
at java.lang.Runtime.loadLibrary(Runtime.java:372)
at java.lang.System.loadLibrary(System.java:1076)
at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:593)
at com.googlecode.javacpp.Loader.load(Loader.java:481)
at com.googlecode.javacpp.Loader.load(Loader.java:431)
at com.googlecode.javacv.cpp.opencv_core.<clinit>(opencv_core.java:136)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at com.googlecode.javacpp.Loader.load(Loader.java:453)
at com.googlecode.javacv.cpp.opencv_imgproc.<clinit>(opencv_imgproc.java:97)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at com.googlecode.javacpp.Loader.load(Loader.java:453)
at com.googlecode.javacv.cpp.opencv_highgui.<clinit>(opencv_highgui.java:85)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at com.googlecode.javacpp.Loader.load(Loader.java:453)
at com.googlecode.javacv.cpp.opencv_calib3d.<clinit>(opencv_calib3d.java:94)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at com.googlecode.javacpp.Loader.load(Loader.java:453)
at com.googlecode.javacv.cpp.opencv_contrib.<clinit>(opencv_contrib.java:104)
at org.opencv.javacv.facerecognition.PersonRecognizer.<init>(PersonRecognizer.java:44)
at org.opencv.javacv.facerecognition.FdActivity$1.onManagerConnected(FdActivity.java:109)
at org.opencv.android.AsyncServiceHelper$3.onServiceConnected(AsyncServiceHelper.java:320)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1223)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1240)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
当我查看com.googlecode.javacv.cpp.opencv_contrib
(由Android Studio反编译)时,linkpath的值为linkpath = {"../lib/"}
。
这似乎是关于错误的问题。
有没有办法可以编译javacv.jar并且可能在这里进行调整?
我可能错了,这部分会导致错误,你还有什么想法吗?