9

I am using Android studio version 1.3.1 and try to integrate the NDK by going to local.proprties and writing ndk.dir= and I got this error

Error:Execution failed for task ':tesstwo:compileReleaseNdk'.

Error: NDK integration is deprecated in the current plugin. Consider trying the new experimental plugin. For details, see http://tools.android.com/tech-docs/new-build-system/gradle-experimental. Set "android.useDeprecatedNdk=true" in gradle.properties to continue using the current NDK integration.

Please help me to sole this issue.

6
  • Check this -> stackoverflow.com/q/31979965/4018207
    – AndiGeeky
    Commented Sep 2, 2015 at 5:29
  • @Mamata I have just added this statement in gradle.properties but its giving no such property and showing the same error.
    – Corrupt
    Commented Sep 2, 2015 at 6:16
  • @ Corrupt : Did you do same same accepted answer .??
    – AndiGeeky
    Commented Sep 2, 2015 at 6:25
  • @Mamata Yes I have followed same procedure as given in the link.
    – Corrupt
    Commented Sep 2, 2015 at 6:41
  • @ Corrupt : Did you have NDK in Android SDK ? and path you have added in ndk.dir= is right ??
    – AndiGeeky
    Commented Sep 2, 2015 at 7:04

1 Answer 1

14

Add this to your build.gradle :

android{
        sourceSets {
              main {
                  jni.srcDirs = []
              }
          }
       }
5
  • @Corrupt : Glad It Worked :)
    – AndiGeeky
    Commented Sep 2, 2015 at 8:01
  • after 10 days of searching it finally worked. Thanks you Commented Dec 13, 2015 at 17:45
  • @ Milad Metias : Welcome :)
    – AndiGeeky
    Commented Dec 14, 2015 at 6:56
  • Note: this is to be added under like this android { sourceSets {} } (under android section). - newbie :)
    – Maulik
    Commented Jul 30, 2017 at 12:20
  • @MaulikGangani: Done! Thanks :)
    – AndiGeeky
    Commented Aug 1, 2017 at 6:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.