gpt4 book ai didi

java - 库 'javacv-android-arm.jar' 包含不会在设备上运行的 native 库

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:59:50 37 4
gpt4 key购买 nike

我该如何解决这个问题?

我刚刚将 javacv jar 文件复制到我的项目 Lib 文件夹下,但出现了这个错误!

我可以找到这个thread来自谷歌,但不幸的是,由于我国的谷歌限制政策,该页面无法打开。

我在我的 android 应用程序中包含这些 jar 的原因是我不想使用 openCV 管理器。我想将 openCV 库静态链接到我的项目。我正在尝试在 Samsung Galaxy S5 上运行我的应用。

这是我遇到的 LogCat 错误:

[2014-07-16 10:13:57 - face-recognition] The library 'javacv-android-arm.jar' contains native libraries that will not run on the device.
[2014-07-16 10:13:57 - face-recognition] The following libraries were found:
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniARToolKitPlus.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniavcodec.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniavdevice.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniavfilter.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniavformat.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniavutil.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjnicvkernels.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniopencv_calib3d.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniopencv_contrib.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniopencv_core.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniopencv_features2d.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniopencv_flann.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniopencv_highgui.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniopencv_imgproc.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniopencv_legacy.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniopencv_ml.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniopencv_nonfree.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniopencv_objdetect.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniopencv_photo.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniopencv_stitching.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniopencv_video.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniopencv_videostab.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjnipostproc.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniswresample.so
[2014-07-16 10:13:57 - face-recognition] - com/googlecode/javacv/cpp/android-arm/libjniswscale.so

EDIT-1在我按照 here 中的说明进行操作后, 感谢 PRAKASH我可以解决这些错误,但我遇到了与 NoClassDefFoundError 完全相关的其他错误。我真的放弃了。我无法解决这个问题,所以任何帮助将不胜感激。这是我的新错误:

07-22 08:48:54.472: E/dalvikvm(11694): Could not find class 'com.googlecode.javacv.cpp.opencv_core$MatVector', referenced from method org.opencv.javacv.facerecognition.PersonRecognizer.train
07-22 08:48:54.472: W/dalvikvm(11694): VFY: unable to resolve new-instance 108 (Lcom/googlecode/javacv/cpp/opencv_core$MatVector;) in Lorg/opencv/javacv/facerecognition/PersonRecognizer;
07-22 08:48:54.472: D/dalvikvm(11694): VFY: replacing opcode 0x22 at 0x001c
07-22 08:48:54.472: D/dalvikvm(11694): DexOpt: unable to opt direct call 0x00c9 at 0x28 in Lorg/opencv/javacv/facerecognition/PersonRecognizer;.train
07-22 08:48:54.472: D/AndroidRuntime(11694): Shutting down VM
07-22 08:48:54.472: W/dalvikvm(11694): threadid=1: thread exiting with uncaught exception (group=0x41737c08)
07-22 08:48:54.477: E/AndroidRuntime(11694): FATAL EXCEPTION: main
07-22 08:48:54.477: E/AndroidRuntime(11694): Process: org.opencv.javacv.facerecognition, PID: 11694
07-22 08:48:54.477: E/AndroidRuntime(11694): java.lang.NoClassDefFoundError: com.googlecode.javacv.cpp.opencv_contrib

最佳答案

下载Javacv latest version

然后提取并放入ffmpeg.jar , javacv.jar , javacpp.jaropencv.jarlibs 项目的文件夹

并且还提取所有 *.so 从 extracted

opencv-android-arm.jar,ffmpeg-android-arm.jar files.

并将所有*.so文件放入libs/armeabi文件夹

更多信息click here

它可能会解决您的问题。

关于java - 库 'javacv-android-arm.jar' 包含不会在设备上运行的 native 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24773153/

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