Ajit Pratap Singh
Ajit Pratap Singh

Reputation: 1289

Getting error --> "Execution failed for task" >NDK not configured

I am trying to compile my code on android studio and I am stuck at this point. I don't have any thing to compile using the ndk but everytime the compilation fails with this error.

When I check the workspace.xml it contains ExternalTaskPojo for compileDebugNdk and compileReleaseNdk.

I don't need them but can't figure out a way to remove them as it is an auto generated file.

Please suggest.

Edit -> build.gradle file

apply plugin: 'android-library'

android {
    compileSdkVersion 19
    buildToolsVersion "19.0.3"

defaultConfig {
    minSdkVersion 9
    targetSdkVersion 9
}

buildTypes {
    release {
        runProguard false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
compile project(':a')
compile project(':b')
compile project(':c')
compile project(':d')
compile project(':e')
compile 'com.android.support:support-v4:19.1.0'
}

Another build.gradle file

   apply plugin: 'android'

   android {
    compileSdkVersion 19
    buildToolsVersion "19.0.3"

defaultConfig {
    minSdkVersion 9
    targetSdkVersion 9


}

buildTypes {
    release {
        runProguard false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-    rules.txt'
        }
    }
}

dependencies {
compile project(':a')
compile project(':facebookSDK')
compile project(':b')
compile project(':c')
compile project(':d')
compile project(':volley')
compile project(':e')
compile project(':volley')
compile project(':f')
compile project(':g')
compile project(':h')
compile 'com.android.support:support-v4:19.1.0'
compile 'com.google.android.gms:play-services:+'
compile files('libs/AF-Android-SDK-v1.3.16.0.jar')
compile files('libs/lib1')
compile files('libs/lib2')
compile files('libs/lib3')
compile files('libs/lib4')
compile files('libs/FlurryAgent.jar')
compile files('libs/renderscript-v8.jar')
compile files('libs/lib5')
}

Upvotes: 3

Views: 3613

Answers (1)

Ajit Pratap Singh
Ajit Pratap Singh

Reputation: 1289

After sometime I was able to fix my problem. I disabled the ndk-build by adding below property in the build.gradle file.

sourceSets.main {
        jniLibs.srcDir 'src/main/libs'
        jni.srcDirs = [] //disable automatic ndk-build call
    }

Upvotes: 5

Related Questions