Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NDK Integration in Android Studio Error

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.

like image 306
Corrupt Avatar asked Sep 02 '15 05:09

Corrupt


People also ask

How do I know if Android NDK is installed?

You'll need to point to your NDK in your eclipse by adding the path of ndk-build to Window > preferences > android > NDK. Right click on your project folder. Choose android tools -> add native support (the bottom one) and click finish. Now it will ask for a name for your .

Is NDK necessary for Android Studio?

The Android Native Development Kit (NDK): a set of tools that allows you to use C and C++ code with Android. CMake: an external build tool that works alongside Gradle to build your native library. You do not need this component if you only plan to use ndk-build.

Where is NDK installed?

Android Studio installs all versions of the NDK in the android-sdk /ndk/ directory. Each version is located in a subdirectory with the version number as its name.


1 Answers

Add this to your build.gradle :

android{
        sourceSets {
              main {
                  jni.srcDirs = []
              }
          }
       }
like image 164
AndiGeeky Avatar answered Oct 21 '22 20:10

AndiGeeky