I\'m assuming it\'s a bug since I didn\'t have any problems until the new update. So I cant use the gradle console to debug my app because I have this warning -
I was able to prevent this annoying message; here is what worked for me.
BACKGROUND:
I am not using the NDK at all, and had never installed the NDK.
However, as mentioned in another answer here by xsveda, this is a Gradle bug that is documented here:
https://code.google.com/p/android/issues/detail?id=228424
and so even the "NDK-innocent" may become its victims.
The problem is that Gradle is computing the location of an NDK folder by just tacking on the string "/ndk-bundle" to the SDK folder location, even if you have never installed the NDK.
After establishing this false expectation of an NDK folder existing in a particular location, each time you build, Gradle gives you a warning that you're "missing" that folder. This is just a warning and does not prevent your build from completing, but it is annoying.
HOW I STOPPED THE ANNOYING MESSAGE:
Since disk space is cheap, and my time is precious to me, I humored this bug by installing the NDK, even though I do not intend to use it.
To do this, you can go to:
File -> Project Structure -> SDK Location
and look in the Android NDK location field. If you have not installed the NDK, this field will be empty.
In that case, below that field will be a link for installing the NDK. Click on that link and install it. It takes a few minutes.
Once the installation completes and you close the installation progress dialog, the location of the NDK will be automatically written into the Android NDK location field. This will be something like:
C:\dev\astudiosdk\ndk-bundle
Click the OK button and build again. The error disappears.
Note that you may be able to just type the expected folder into this field; I did not try that. But I don't know whether that might cause some other problems, especially if you eventually decide to actually use the NDK.
Sounds like maybe updating SDK from Android Studio IDE could help
Steps are:
Tools (top-menu item) > Android > SDK Manager
Screen shots here: How to update Android NDK in place?
This type of error statement are:-
Solution:
Open your build.gradle
and here you are see two gradle path like:
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.android.tools.build:gradle:2.2.0'
You can remove one of those classpath and keep only one Classpath.
Clean the project gradlew clean
This is working for me never require to set the ndk path or the ndk setting.
If you cannot build your project while releasing APK
That warning you see is just a warning. Whats funny is that its most likely you left some languages strings.xml without required names. Or some of localized strings-.xml has unwanted characters like " ' " which should be leplaced with e.g " \' " . Overall it can be related to your app resources. Recheck them carefully first.
Go to Gradle Scripts then to local.properties and set the SDK , and NDK locations properly, in my case the setting is:
ndk.dir=F:\AndroidSDK\ndk-bundle sdk.dir=F:\AndroidSDK