我正在使用openCV在android中进行面部识别,但无法加载googlecode和javacv库。 已经在
中拥有javacpp.jar和javacv.jarjniLibs
文件夹
也用过
编译' com.googlecode.javacpp:javacpp:0.7'
在build.gradle中。
我的build.gradle如下:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "com.example.rsehdev.opencv"
minSdkVersion 18
targetSdkVersion 24
versionCode 1
versionName "1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { main { jni.srcDirs = ['src/main/jni', 'src/main/jniLibs/'] } }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
testCompile 'junit:junit:4.12'
compile project(':openCVLibrary320')
compile 'com.googlecode.javacpp:javacpp:0.7'
//compile 'com.googlecode.javacv:javacv:0.7'
}