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

我的梦境 提交于 2019-12-05 07:18:38

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 .

If you haven't yet installed the Android Development Environment, you can follow this link which contains everything you need to get started quickly. Watch the tutorial video and follow the instructions underneath to install Eclipse, the Integrated Development Environment (IDE) for Android development and create a new project.

Once you have installed everything and have created the project, use the following procedure to import JavaCV libraries to the Android project:

Download the JavaCv libraries: a. From this link download "javacv-0.7-bin.zip " and extract the files: - javacpp.jar - javacv.jar - javacv-android-arm.jar b. From this link download "javacv-0.7-cppjars.zip" and extract the files: - opencv-2.4.8-android-arm.jar - ffmpeg-2.1.1-android-arm.jar

Go to File > New > Folder, select your project as parent folder, type "libs/armeabi" as Folder name, and click Finish.

Copy javacpp.jar and javacv.jar into the "libs" folder.

Extract all the *.so files from javacv-android-arm.jar, opencv-2.4.8-android-arm.jar, and ffmpeg-2.1.1-android-arm.jar directly into the "libs/armeabi" folder, without creating any of the subdirectories found in the JAR files. (The easiest way to extract the .so files from the .jar is by using 7-ZIP software which can be downloaded here).

Navigate to Project > Properties > Java Build Path > Libraries and click "Add JARs...".

Select both javacpp.jar and javacv.jar from the "libs" folder.

Finally,import JavaCV functions to your code

 import static com.googlecode.javacv.cpp.opencv_core.*;
 import static com.googlecode.javacv.cpp.opencv_imgproc.*;
 import static com.googlecode.javacv.cpp.opencv_highgui.*;

and use some sample code to check that everything is working correctly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!