opencv-documentscanner-android
opencv-documentscanner-android copied to clipboard
NDK Compilation error.
Error:(198) *** Android NDK: Aborting... . Stop. and Error:Execution failed for task ':app:ndkBuild'. Process 'command <NDK path> finished with non-zero exit value 2
below is my app level build.gradle Please give a solution
`apply plugin: 'com.android.application import org.apache.tools.ant.taskdefs.condition.Os
android { compileSdkVersion 25 buildToolsVersion "25.0.2" defaultConfig { applicationId "prisca.ctest" minSdkVersion 21 targetSdkVersion 25 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" externalNativeBuild { cmake { cppFlags "-frtti -fexceptions" abiFilters 'x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'mips', 'mips64' } } }
sourceSets.main {
jniLibs.srcDir 'src/main/libs' //set .so files directory to libs
jni.srcDirs = [] //disable automatic ndk-build call
}
// call regular ndk-build(.cmd) script from app directory
task ndkBuild(type: Exec) {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def ndkDir = properties.getProperty('ndk.dir')
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine "$ndkDir/ndk-build.cmd", '-C', file('src/main').absolutePath
} else {
commandLine 'ndk-build', '-C', file('src/main').absolutePath
}
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn ndkBuild
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
}
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:25.2.0' compile "com.android.support:support-v4:25.2.0" compile "com.android.support:support-v13:25.2.0" compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4' testCompile 'junit:junit:4.12' compile project(':openCVLibrary320')
compile 'com.github.chrisbanes:PhotoView:1.3.1'
} `
@sayantans3 What Android Studio version are you using?
I'm using Android Studio Version 2.3.1
Hey @vulovicv23 Any fix on this? @sayantans3 Did you find the solution.
@asbadve not yet. Found another useful library.
@sayantans3 which one?
@asbadve this program is working for me. the only thing that does not work is the auto focus.
Sorry guys, I'm not maintaining this project anymore.
Remove theses
armeabi', 'mips', 'mips64'