How can I import BoofCV in my Android Studio project? I have already looked here. I am totally confused. Please provide me a step by step guide. I appreciate your help.
How to use BoofCV in Android Studio?
1.8k Views Asked by Salman Younas AtThere are 3 best solutions below

When Integrating BoofCV in Android Studio I faced some issues. I am posting those and its solutions here, so that it will be useful for others.
BoofCV Android Support Integration Document Link https://boofcv.org/index.php?title=Android_support
Adding BoofCV in Android Studio
If you are going to use only one module you can add the following code to app/build.gradle
dependencies {
api group: 'org.boofcv', name: 'boofcv-android', version: '0.34'
}
If you are going to use more than one module you can add the following code to app/build.gradle
dependencies {
['boofcv-android', 'boofcv-core'].each { String a -> api group: 'org.boofcv', name: a, version: '0.34' }
}
Conflicts with Android dependencies
If you are getting conflicts error you need to add the following in app/build.gradle
configurations {
all*.exclude group: "xmlpull", module: "xmlpull"
all*.exclude group: "org.apache.commons", module: "commons-compress"
all*.exclude group: "com.thoughtworks.xstream", module: "commons-compress"
}
Failure Verifying Dex Error
If you get failure to verify dex file bad method handle type 7 then you need to add the following in app/build.gradle
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
Adding the line below to app/build.gradle should do the trick
Replace 0.23 with whatever is the current version.
UPDATE In more recent versions you need to do the following instead: