I\'m trying use JavaCV with Android Studio and Gradle. I wrote such code fragment:
repositories {
mavenCentral()
maven {
url \"http://maven2.j
Ok, I did it on my own :). So here is what we should do to use JavaCV in Android Studio:
1) First we should add such dependencies to build.gradle inside project:
dependencies {
compile group: 'com.googlecode.javacpp', name: 'javacpp', version: '0.7'
compile group: 'com.googlecode.javacv', name: 'javacv', version: '0.7'}
(I mean: build.gradle inside our module directory)
Thanks that we get javacv.jar and javacpp.jar inside external libraries (if not, we should restart Android Studio).
2) If we follow the Eclipse instruction on javacv official site we are now in point 4.:
Extract all the *.so files rom javacv-android-arm.jar, opencv-2.4.8-android-arm.jar, and ffmpeg-2.1.1-android-arm.jar directly into the newly created "libs/armeabi" folder, without creating any of the subdirectories found in the JAR files.
We have to extract all *.so files which we need, but then we should join them to our project in other special way: 3rd answer here says about it, but generally, we should:
3) Enjoy your OpenCV and JavaCv in Android Studio (and don't forget to add
to your AndroidManifest.xml if you want to read/save image from/to sdcard and try thanks this, that your project works well).
/////////////////////////////////////////////////////////
If something is wrong, please write about it in comments.