I tryed import OpenCV module in my project. I find some nice tutorial and create new project to test OpenCV implementation. Problem, when I import library OpenCV in a new project all works well (tutorial here).
But when I have done the same whit existing project I got an error
I try fix it but without success. How can I fix it?
Gradle file
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
}
apply plugin: 'com.android.application'
repositories {
jcenter()
}
dependencies {
compile 'com.android.support:support-v4:23.2.0'
compile 'com.android.support:support-v13:23.2.0'
compile 'com.android.support:cardview-v7:23.2.0'
compile 'com.android.support:appcompat-v7:23.2.0'
compile files('libs/svgandroid.jar')
compile files('libs/svg-android.jar')
compile files('libs/guava-16.0.1.jar')
}
// The sample build uses multiple directories to
// keep boilerplate and common code separate from
// the main sample code.
List<String> dirs = [
'main', // main sample code; look here for the interesting stuff.
'common', // components that are reused by multiple samples
'template' // boilerplate code that is generated by the sample template process
]
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
minSdkVersion 22
targetSdkVersion 23
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
sourceSets {
main {
dirs.each { dir ->
java.srcDirs "src/${dir}/java"
res.srcDirs "src/${dir}/res"
}
}
androidTest.setRoot('tests')
androidTest.java.srcDirs = ['tests/src']
}
}