I just cloned my code from repository and I got this error after adding ndk path and run the project. Have seen many related solutions but nothing worked.
:sdk:buildNdk FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task
:sdk:buildNdk
.Process 'command '/home/suneel/Android/Android/adt-bundle-linux-x86_64-20140702/ndk/ndk-build'' finished with non-zero exit value 2
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Here is my build.gradle file
android { compileSdkVersion 22 buildToolsVersion "23.0.2"
defaultConfig {
testApplicationId "androidTest.com.xyz"
testInstrumentationRunner "android.test.InstrumentationTestRunner"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
jni.srcDirs = []
jniLibs.srcDir 'libs'
}
androidTest {
java.srcDirs = ['src/androidTest']
}
}
lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
testOptions.unitTests.all {
testLogging {
events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
outputs.upToDateWhen { false }
showStandardStreams = true
}
}
}
Thanks in advance.