The library 'javacv-android-arm.jar' contains native libraries that will not run on the device

android, android-ndk, google-code, java, opencv

Solution

download Javacv latest version

and extract it and put `ffmpeg.jar` ,`javacv.jar` ,`javacpp.jar` and `opencv.jar` in `libs` folder of your project

and also extract all *.so from extracted

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

and put all *.so files inside libs/armeabi folder

for more information click here

it may solve your problem .

Problem

How can I resolve this issue? I've just copy javacv jar files under my project `Lib` folder and got this error! I can find this thread from google but the page can not be opened because of google restrictions policy in my country unfortunately. The reason I include these jars in my android application is that I do not want to use `openCV manager`. I want to statically link `openCV` library to my project. I am trying to run my app on `Samsung Galaxy S5`. Here is the `LogCat` errors I've got: ``` [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 After I follow the instruction in here, thanks to PRAKASH I could resolve these errors, but I have got other errors which are totally related to `NoClassDefFoundError`. I really give up. I can not resolve the issue, so any help would be really appreciated. Here are my new errors: ``` 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 ```

Original source