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 -
Fixed this issue by removing an empty ndk-bundle
folder from SDK root folder (have no idea why and when it has appeared):
Here is the explanation why it helps from the issue on Android bug tracker:
For anyone still experience this issue on plugin 3.0.0-alpha1 or later. Please file a new bug and try to answer all question in #33. We need more information to debug the problem and adding comments to a closed bug is an easy way for it to get lost.
To give a bit of background, the plugin checks whether the NDK directory is valid. Most likely, you are not using NDK. We automatically assume it's in {sdk}/ndk-bundle. It will be ignored if {sdk}/ndk-bundle does not exist. If you see 'NDK is missing a "platforms" directory.', it means there is an {sdk}/ndk-bundle, but not a {sdk}/ndk-bundle/platforms directory. This means you have a corrupted NDK for some reason. It is safe to just remove {sdk}/ndk-bundle if you are not using it.
Updating the NDK in the Android Studio SDK tools solved my issue.
You can give it a try :
There is a checkbox for it in android studio already.
Android Studio -> Preferences -> Compiler -> Gradle -> Command-line Options -> Configure on Demand
Uncheck it and then sync gradle again
You should not use a directory path with spaces for Android SDK. As an easy cure you can manually change
sdk.dir=C:/Users/EMILYT~1/AppData/Local/Android/Sdk
You don't need to install NDK.
For me, the NDK error turned out to be a false diagnosis. This error occurred when gradle threw a ClassNotFound
exception on java.io.UncheckedIOException
class.
Although the class is defined in Java 8, it was not included in the JDK 1.8.0u51 (or presumably earlier versions) which I had installed.
Updating the JDK and removing the 1.8.0u51 version resolved the issue.
Just install the Android NDK.
That fixed my error and warning!
ools -> Android -> SDK Manager
SDK Tools
NDK