AndroidStudio/NDK - finished with non-zero exit value2

asked 2015-03-27 14:43:53 -0600

loleczek gravatar image

Android Studio 1.1.0 NDK = r10d OpenCV4Android 2.4.10

Can't run OpenCV4android Sample#2/mixed processing.

Information:BUILD FAILED Error:Execution failed for task ':openCVTutorial2MixedProcessing:compileDebugNdk'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\MYDATA\android-ndk-r10d\ndk-build.cmd'' finished with non-zero exit value 2

I've added the NDK directory. I've tried the extra empty c file. New to all this so I don't really understand what is going on. Found other threads that question this "exit value 2" error with no real answer.

edit retag flag offensive close merge delete

Comments

I'm having the exact same issue as loleczek. Please HELP!

meltedbrains gravatar imagemeltedbrains ( 2015-04-01 02:47:09 -0600 )edit
2

I've had the same problem, and I resolved it by addind this :
sourceSets {
     main {
          res.srcDirs = ['src/main/res']
          jniLibs.srcDirs = ['src/main/jniLibs']
          jni.srcDirs = [] // This prevents the auto generation of Android.mk
     }
}
to my build.gradle (the one in app) in the android object. Maybe it will work for you ;)

AllXS gravatar imageAllXS ( 2015-05-05 12:29:14 -0600 )edit

hi i sign up on this site just for say thank you . u help me a lot thank you thank you thank you

appsduck gravatar imageappsduck ( 2016-07-11 16:25:02 -0600 )edit

@AIIXS I too signed up just to thank you. This is the only solution on the internet which fixed the problem! Thank you!

sudhamr gravatar imagesudhamr ( 2017-01-07 06:56:49 -0600 )edit

this solution did not work for me

abgg gravatar imageabgg ( 2017-01-19 03:47:01 -0600 )edit

i m having same issue and it is not resolve plz help me....???

iram gravatar imageiram ( 2017-02-25 04:54:17 -0600 )edit

Did anybody find a solution? I have currently the same problem :(

Mary-Ann gravatar imageMary-Ann ( 2018-11-14 19:08:41 -0600 )edit