I am integrating the opencv library with my project. I successfully configured NDK with the experimental gradle plugin. But an error with Opencv. Here is the error displayed in my cpp file.

My build.gradle:
apply plugin: 'com.android.model.application'
model {
android {
compileSdkVersion = 23
buildToolsVersion = "23.0.0"
defaultConfig.with {
applicationId = "com.legalplex.dharani.android"
minSdkVersion.apiLevel = 14
targetSdkVersion.apiLevel = 23
buildConfigFields.with {
create() {
type = "int"
name = "VALUE"
value = "1"
}
}
}
}
android.ndk {
moduleName = "document_scanner"
cppFlags += "-fno-rtti"
cppFlags += "-fno-exceptions"
ldLibs = ["android", "log"]
stl ="gnustl_shared"
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles += file('proguard-rules.pro')
}
}
android.productFlavors {
// for detailed abiFilter descriptions, refer to "Supported ABIs" @
// https://developer.android.com/ndk/guides/abis.html
create("arm") {
ndk.abiFilters += "armeabi"
}
create("arm7") {
ndk.abiFilters += "armeabi-v7a"
}
create("arm8") {
ndk.abiFilters += "arm64-v8a"
}
create("x86") {
ndk.abiFilters += "x86"
}
create("x86-64") {
ndk.abiFilters += "x86_64"
}
create("mips") {
ndk.abiFilters += "mips"
}
create("mips-64") {
ndk.abiFilters += "mips64"
}
// To include all cpu architectures, leaves abiFilters empty
create("all")
}
}
dependencies {
compile 'com.android.support:support-v4:19.1.0'
compile project(':openCVLibrary')
}
Why it shows an error in opencv, includes even after adding a module dependency in my gradle file. Please help me. How to configure build.gradle file to activate our Android.mk. Here is my Android.mk file:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include OpenCV-2.4.10-android-sdk\sdk\native\jni\OpenCV.mk
OPENCV_INSTALL_MODULES := on
LOCAL_MODULE := document_scanner
LOCAL_SRC_FILES := jni_part.cpp
LOCAL_C_INCLUDES := OpenCV-2.4.10-android-sdk\sdk\native\jni\include
OPENCV_LIB_TYPE:=STATIC
LOCAL_LDLIBS += -llog
include $(BUILD_SHARED_LIBRARY)
source
share