无法运行openCV示例FaceDetection应用程序

时间:2012-08-11 10:28:53

标签: android eclipse opencv

我已经下载了openCV库。现在,当我尝试运行示例faceDetection应用程序时,它显示以下错误:

08-11 15:59:55.071: E/AndroidRuntime(13837): FATAL EXCEPTION: main
08-11 15:59:55.071: E/AndroidRuntime(13837): java.lang.UnsatisfiedLinkError: Couldn't load detection_based_tracer: findLibrary returned null

 08-11 15:59:55.071: E/AndroidRuntime(13837):   at java.lang.Runtime.loadLibrary(Runtime.java:429)
08-11 15:59:55.071: E/AndroidRuntime(13837):    at java.lang.System.loadLibrary(System.java:554)
08-11 15:59:55.071: E/AndroidRuntime(13837):    at com.kratin.opencvfacedetection.FdActivity$1.onManagerConnected(FdActivity.java:36)
08-11 15:59:55.071: E/AndroidRuntime(13837):    at org.opencv.android.AsyncServiceHelper$1.onServiceConnected(AsyncServiceHelper.java:206)
08-11 15:59:55.071: E/AndroidRuntime(13837):    at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1064)
 08-11 15:59:55.071: E/AndroidRuntime(13837):   at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1081)
08-11 15:59:55.071: E/AndroidRuntime(13837):    at android.os.Handler.handleCallback(Handler.java:587)
08-11 15:59:55.071: E/AndroidRuntime(13837):    at android.os.Handler.dispatchMessage(Handler.java:92)
08-11 15:59:55.071: E/AndroidRuntime(13837):    at android.os.Looper.loop(Looper.java:130)
  08-11 15:59:55.071: E/AndroidRuntime(13837):  at android.app.ActivityThread.main(ActivityThread.java:3701)
 08-11 15:59:55.071: E/AndroidRuntime(13837):   at java.lang.reflect.Method.invokeNative(Native Method)
 08-11 15:59:55.071: E/AndroidRuntime(13837):   at java.lang.reflect.Method.invoke(Method.java:507)
 08-11 15:59:55.071: E/AndroidRuntime(13837):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
 08-11 15:59:55.071: E/AndroidRuntime(13837):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624)
 08-11 15:59:55.071: E/AndroidRuntime(13837):   at dalvik.system.NativeStart.main(Native Method)

但预编译的facedetection.apk运行没有任何问题。所以当我从示例应用程序运行它时会出错?请帮帮我..我正在使用ubuntu os。

2 个答案:

答案 0 :(得分:0)

Solved ..我已经将环境变量路径设置为ndk ..并使用ln命令建立了链接,重建后问题解决了。

答案 1 :(得分:0)

如果你使用ubuntu,

项目右键单击 - >属性 - > c / c ++ build - >构建命令

如果这是ndk-build.cmd,你必须修复"你的ndk路径/ ndk-build"