1

从git获取openv for android并编译后,我尝试运行第三个教程,问题是我得到opencv drror:无法加载opencv的信息库

02-18 12:04:26.959: W/System.err(9329): java.lang.UnsatisfiedLinkError: Couldn't load opencv_java: findLibrary returned null
02-18 12:04:26.959: W/System.err(9329):     at java.lang.Runtime.loadLibrary(Runtime.java:365)
02-18 12:04:26.959: W/System.err(9329):     at java.lang.System.loadLibrary(System.java:535)
02-18 12:04:26.959: W/System.err(9329):     at org.opencv.android.StaticHelper.loadLibrary(StaticHelper.java:54)
02-18 12:04:26.959: W/System.err(9329):     at org.opencv.android.StaticHelper.initOpenCVLibs(StaticHelper.java:85)
02-18 12:04:26.964: W/System.err(9329):     at org.opencv.android.StaticHelper.initOpenCV(StaticHelper.java:29)
02-18 12:04:26.964: W/System.err(9329):     at org.opencv.android.OpenCVLoader.initDebug(OpenCVLoader.java:26)
02-18 12:04:26.964: W/System.err(9329):     at org.opencv.samples.tutorial3.Sample3Native.<clinit>(Sample3Native.java:27)
02-18 12:04:26.964: W/System.err(9329):     at java.lang.Class.newInstanceImpl(Native Method)
02-18 12:04:26.964: W/System.err(9329):     at java.lang.Class.newInstance(Class.java:1319)
02-18 12:04:26.964: W/System.err(9329):     at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
02-18 12:04:26.964: W/System.err(9329):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2015)
02-18 12:04:26.964: W/System.err(9329):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
02-18 12:04:26.964: W/System.err(9329):     at android.app.ActivityThread.access$600(ActivityThread.java:140)
02-18 12:04:26.964: W/System.err(9329):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
02-18 12:04:26.964: W/System.err(9329):     at android.os.Handler.dispatchMessage(Handler.java:99)
02-18 12:04:26.964: W/System.err(9329):     at android.os.Looper.loop(Looper.java:137)
02-18 12:04:26.964: W/System.err(9329):     at android.app.ActivityThread.main(ActivityThread.java:4898)
02-18 12:04:26.964: W/System.err(9329):     at java.lang.reflect.Method.invokeNative(Native Method)
02-18 12:04:26.964: W/System.err(9329):     at java.lang.reflect.Method.invoke(Method.java:511)
02-18 12:04:26.964: W/System.err(9329):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1008)
02-18 12:04:26.964: W/System.err(9329):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:775)
02-18 12:04:26.964: W/System.err(9329):     at dalvik.system.NativeStart.main(Native Method)

但是当我尝试将 libopencv_java 和 libopencv_info 复制到 lib/arm7v 时,它会被 eclipse 自动删除!但是 libnative 相机可以吗?

4

1 回答 1

1

事实证明,启用静态链接会阻止共享库管理,主要是 libopencv_java 和 libopencv_info 库不会添加到输出中,以解决我手动加载这两个库的问题。

于 2013-02-18T17:34:13.413 回答