从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相机还可以知道吗?
原来启用静态链接会阻止共享库管理,主要是libopencv.java和libopencv_info库不会添加到输出中,以解决我手动加载这两个库的问题。