我按照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
非常感谢所有答案。谢谢。