gpt4 book ai didi

android - Android 上的 JavaCV 示例(FacePreview)无法正常工作

转载 作者:太空宇宙 更新时间:2023-11-03 21:54:13 29 4
gpt4 key购买 nike

我按照 http://code.google.com/p/javacv/ 中的指示做了所有事情(JavaCV 主页)。我的代码中没有错误。但是当我尝试在 android 模拟器上启动应用程序时,它说“不幸的是,appname 已经停止。我现在不知道去哪里看。有什么建议吗?

这些可以在 logcat 文本文件中找到。

10-07 03:41:15.878: E/dalvikvm(1138): dlopen("/data/app-lib/com.googlecode.javacv.facepreview-2/libjniopencv_core.so") failed: dlopen failed: cannot locate symbol "_ZSt10unexpectedv" referenced by "libjniopencv_core.so"...
10-07 03:41:15.928: E/AndroidRuntime(1138): FATAL EXCEPTION: main
10-07 03:41:15.928: E/AndroidRuntime(1138): java.lang.NoClassDefFoundError: java.lang.ClassNotFoundException: com.googlecode.javacv.cpp.opencv_objdetect
10-07 03:41:15.928: E/AndroidRuntime(1138): at com.googlecode.javacpp.Loader.load(Loader.java:455)
10-07 03:41:15.928: E/AndroidRuntime(1138): at com.googlecode.javacv.facepreview.FaceView.<init>(FacePreview.java:85)
10-07 03:41:15.928: E/AndroidRuntime(1138): at com.googlecode.javacv.facepreview.FacePreview.onCreate(FacePreview.java:51)
10-07 03:41:15.928: E/AndroidRuntime(1138): at android.app.Activity.performCreate(Activity.java:5133)
10-07 03:41:15.928: E/AndroidRuntime(1138): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
10-07 03:41:15.928: E/AndroidRuntime(1138): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
10-07 03:41:15.928: E/AndroidRuntime(1138): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
10-07 03:41:15.928: E/AndroidRuntime(1138): at android.app.ActivityThread.access$600(ActivityThread.java:141)
10-07 03:41:15.928: E/AndroidRuntime(1138): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
10-07 03:41:15.928: E/AndroidRuntime(1138): at android.os.Handler.dispatchMessage(Handler.java:99)
10-07 03:41:15.928: E/AndroidRuntime(1138): at android.os.Looper.loop(Looper.java:137)
10-07 03:41:15.928: E/AndroidRuntime(1138): at android.app.ActivityThread.main(ActivityThread.java:5103)
10-07 03:41:15.928: E/AndroidRuntime(1138): at java.lang.reflect.Method.invokeNative(Native Method)
10-07 03:41:15.928: E/AndroidRuntime(1138): at java.lang.reflect.Method.invoke(Method.java:525)
10-07 03:41:15.928: E/AndroidRuntime(1138): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
10-07 03:41:15.928: E/AndroidRuntime(1138): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
10-07 03:41:15.928: E/AndroidRuntime(1138): at dalvik.system.NativeStart.main(Native Method)
10-07 03:41:15.928: E/AndroidRuntime(1138): Caused by: java.lang.ClassNotFoundException: com.googlecode.javacv.cpp.opencv_objdetect
10-07 03:41:15.928: E/AndroidRuntime(1138): at java.lang.Class.classForName(Native Method)
10-07 03:41:15.928: E/AndroidRuntime(1138): at java.lang.Class.forName(Class.java:204)
10-07 03:41:15.928: E/AndroidRuntime(1138): at com.googlecode.javacpp.Loader.load(Loader.java:453)
10-07 03:41:15.928: E/AndroidRuntime(1138): ... 16 more
10-07 03:41:15.928: E/AndroidRuntime(1138): Caused by: java.lang.NoClassDefFoundError: java.lang.ClassNotFoundException: com.googlecode.javacv.cpp.opencv_imgproc
10-07 03:41:15.928: E/AndroidRuntime(1138): at com.googlecode.javacpp.Loader.load(Loader.java:455)
10-07 03:41:15.928: E/AndroidRuntime(1138): at com.googlecode.javacv.cpp.opencv_objdetect.<clinit>(opencv_objdetect.java:97)
10-07 03:41:15.928: E/AndroidRuntime(1138): ... 19 more
10-07 03:41:15.928: E/AndroidRuntime(1138): Caused by: java.lang.ClassNotFoundException: com.googlecode.javacv.cpp.opencv_imgproc
10-07 03:41:15.928: E/AndroidRuntime(1138): at java.lang.Class.classForName(Native Method)
10-07 03:41:15.928: E/AndroidRuntime(1138): at java.lang.Class.forName(Class.java:204)
10-07 03:41:15.928: E/AndroidRuntime(1138): at com.googlecode.javacpp.Loader.load(Loader.java:453)
10-07 03:41:15.928: E/AndroidRuntime(1138): ... 20 more
10-07 03:41:15.928: E/AndroidRuntime(1138): Caused by: java.lang.NoClassDefFoundError: java.lang.ClassNotFoundException: com.googlecode.javacv.cpp.opencv_core
10-07 03:41:15.928: E/AndroidRuntime(1138): at com.googlecode.javacpp.Loader.load(Loader.java:455)
10-07 03:41:15.928: E/AndroidRuntime(1138): at com.googlecode.javacv.cpp.opencv_imgproc.<clinit>(opencv_imgproc.java:97)
10-07 03:41:15.928: E/AndroidRuntime(1138): ... 23 more
10-07 03:41:15.928: E/AndroidRuntime(1138): Caused by: java.lang.ClassNotFoundException: com.googlecode.javacv.cpp.opencv_core
10-07 03:41:15.928: E/AndroidRuntime(1138): at java.lang.Class.classForName(Native Method)
10-07 03:41:15.928: E/AndroidRuntime(1138): at java.lang.Class.forName(Class.java:204)
10-07 03:41:15.928: E/AndroidRuntime(1138): at com.googlecode.javacpp.Loader.load(Loader.java:453)
10-07 03:41:15.928: E/AndroidRuntime(1138): ... 24 more
10-07 03:41:15.928: E/AndroidRuntime(1138): Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZSt10unexpectedv" referenced by "libjniopencv_core.so"...
10-07 03:41:15.928: E/AndroidRuntime(1138): at java.lang.Runtime.loadLibrary(Runtime.java:361)
10-07 03:41:15.928: E/AndroidRuntime(1138): at java.lang.System.loadLibrary(System.java:525)
10-07 03:41:15.928: E/AndroidRuntime(1138): at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:593)
10-07 03:41:15.928: E/AndroidRuntime(1138): at com.googlecode.javacpp.Loader.load(Loader.java:489)
10-07 03:41:15.928: E/AndroidRuntime(1138): at com.googlecode.javacpp.Loader.load(Loader.java:431)
10-07 03:41:15.928: E/AndroidRuntime(1138): at com.googlecode.javacv.cpp.opencv_core.<clinit>(opencv_core.java:136)
10-07 03:41:15.928: E/AndroidRuntime(1138): ... 27 more

非常感谢所有答案。谢谢。

最佳答案

尝试将其插入到 build.gradle 依赖项中

compile ‘org.bytedeco:javacv:+’
compile group: ‘org.bytedeco.javacpp-presets’, name: ‘opencv’, version: ‘2.4.10–0.10', classifier: ‘android-arm’
compile group: ‘org.bytedeco.javacpp-presets’, name: ‘ffmpeg’, version: ‘2.5.1–0.10', classifier: ‘android-arm’

关于android - Android 上的 JavaCV 示例(FacePreview)无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19069755/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com