javacv 有一个android“RecordActivity.java”的样本,我测试过它,它与三星设备完美兼容,但不适用于华为honor 6。我使用的是javacv 1.2版和最新的二进制文件。错误:
06-12 16:00:37.595 10778-11036/com.example.example E/dalvikvm: dlopen("/data/app-lib/com.example.example-1/libjniavutil.so") failed: dlopen failed: cannot locate symbol "av_version_info" referenced by "libjniavutil.so"...
我试过这个https://github.com/bytedeco/javacv/issues/333但仍然出错
我正在使用 android studio 2.1.2,这是我的 Gradle.Build:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
lintOptions { abortOnError false }
defaultConfig {
applicationId "com.example.example"
minSdkVersion 15
targetSdkVersion 18
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
pickFirst 'META-INF/maven/org.bytedeco.javacpp-presets/opencv/pom.properties'
pickFirst 'META-INF/maven/org.bytedeco.javacpp-presets/opencv/pom.xml'
pickFirst 'META-INF/maven/org.bytedeco.javacpp-presets/ffmpeg/pom.properties'
pickFirst 'META-INF/maven/org.bytedeco.javacpp-presets/ffmpeg/pom.xml'
pickFirst 'META-INF/maven/org.bytedeco.javacpp-presets/flandmark/pom.properties'
pickFirst 'META-INF/maven/org.bytedeco.javacpp-presets/flandmark/pom.xml'
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.1.1'
compile files('libs/ffmpeg.jar')
compile files('libs/javacpp.jar')
compile files('libs/javacv.jar')
}
这是我的 libs 文件夹: