NDK is not configured I am trying to compile my code in android studio and I am stuck at t...">

Getting error & # 8594; "Execution failed for task"> NDK is not configured

I am trying to compile my code in android studio and I am stuck at this step. I have nothing to compile with ndk, but every time compilation fails with this error.

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

I don't need them, but can't find 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')
}

      

+3


source to share


1 answer


After a while, I was able to fix my problem. I disabled ndk-build by adding below property to build.gradle file.



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

      

+5


source







All Articles