Error:Execution failed for task ':quiet:ndkBuild'.
Process 'command 'C:\Users\admin\AppData\Local\Android\Sdk\ndk-bundle/ndk-build.cmd'' finished with non-zero exit value 2[](
[]([](`buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "abc.com"
minSdkVersion 16
versionCode 3
versionName "1.3"
jackOptions {
enabled true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
res.srcDirs = ['src/main/res']
jniLibs.srcDirs = ['src/main/jniLibs']
jni.srcDirs = [] // This prevents the auto generation of Android.mk
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'com.android.support:appcompat-v7:26+'
compile 'com.android.support:design:26.+'
compile 'com.google.android.gms:play-services-maps:7.8.0'
compile 'com.google.android.gms:play-services-location:7.8.0'
compile 'com.turbomanage.basic-http-client:http-client-android:0.89'
compile 'com.android.support:recyclerview-v7:26.+'
compile 'com.google.code.gson:gson:2.3'
compile 'com.github.bluejamesbond:textjustify-android:2.1.1'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.akexorcist:RoundCornerProgressBar:2.0.3'
compile 'com.google.android.gms:play-services:+'
compile 'com.android.support:multidex:1.0.0'
compile 'com.mattluedke:snowshoelib:1.0.4'
compile 'com.android.support:support-v4:26.+'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile('com.twitter.sdk.android:tweet-composer:1.0.3@aar') {
transitive = true;
}
compile 'de.hdodenhof:circleimageview:2.0.0'
compile project(':lib')
compile project(path: ':quiet')
compile('com.crashlytics.sdk.android:crashlytics:2.6.0@aar') {
transitive = true;
}
}
android {
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'com.android.library'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable = true
jniDebuggable = true
}
}
sourceSets { main {
jniLibs.srcDir 'src/main/libs'
jni.srcDirs = []
} }
[`
[
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support:support-annotations:23.0.0'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile 'com.android.support.test:runner:0.5'
compile 'com.android.support:appcompat-v7:26+'
}
def getNdkDir() {
if (System.env.ANDROID_NDK_ROOT != null)
return System.env.ANDROID_NDK_ROOT
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def ndkdir = properties.getProperty('ndk.dir', null)
if (ndkdir == null)
throw new GradleException("NDK location not found. Define location with ndk.dir in the local.prope" +
"rties file or with an ANDROID_NDK_ROOT environment variable.")
return ndkdir
}
def getNdkBuildCmd() {
def ndkbuild = getNdkDir() + "/ndk-build"
if (Os.isFamily(Os.FAMILY_WINDOWS))
ndkbuild += ".cmd"
}
task ndkBuild(type:Exec, description: "Compile JNI Sources") {
workingDir file('src/main')
commandLine getNdkBuildCmd()
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn ndkLibsToJar
}
task ndkLibsToJar(type: Zip, dependsOn: 'ndkBuild', description: 'Create a JAR of the native libs') {
destinationDir new File(buildDir, 'libs')
baseName 'ndk-libs'
extension 'jar'
from(new File(buildDir, 'libs')) { include '**/*.so' }
into 'lib/'
})]
`](url)
These are my build gradle files for app and quiet module. Not getting how to resolve the issues.
Error:Gradle project ndkBuild.path is C:\Users\admin\Desktop\android Studio projects\New folder\stumb\stumb\app\src\main\jni\Android.mk but that file doesn't exist