OpenCV 4.1.2 cannot load .so library in android

asked 2019-11-13 21:19:49 -0500

SourceSets:

sourceSets {
    main {
        assets.srcDirs = ['src/main/assets', 'src/main/assets/']
        jni.srcDirs = ['src/main/jni', 'src/main/jniLibs/']
    }
}

Splits:

splits {
    abi {
        enable true
        reset()
        include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
        universalApk true
    }
}

Dependencies:

implementation project(path: ':OpenCVLibrary412')

Module:OpenCVLibrary412: apply plugin: 'com.android.library'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.0"

    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 29
    }

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}

}

The errors:

D/OpenCV/StaticHelper: Trying to get library list
E/OpenCV/StaticHelper: OpenCV error: Cannot load info library for OpenCV
D/OpenCV/StaticHelper: Library list: ""
D/OpenCV/StaticHelper: First attempt to load libs
D/OpenCV/StaticHelper: Trying to init OpenCV libs
D/OpenCV/StaticHelper: Trying to load library opencv_java4
D/OpenCV/StaticHelper: Cannot load library "opencv_java4"
D/OpenCV/StaticHelper: First attempt to load libs fails
edit retag flag offensive close merge delete

Comments

please read this question

LBerger gravatar imageLBerger ( 2019-11-14 03:11:31 -0500 )edit