I've got a project that only uses the Android SDK, not the NDK, but I'm getting warnings whenever I build with gradle about the NDK:
NDK is missing a "platforms" directory. If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /usr/local/opt/android-sdk/ndk-bundle. If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
Seems like a pretty clear warning. I'm not using the ndk, so there is no ndk-bundle
in my android-sdk
. The issue is that I don't have an ANDROID_NDK_HOME
set, and my local.properties
file (which appears to be generated by Android Studio) doesn't set the NDK:
sdk.dir=/usr/local/opt/android-sdk
I do have an ANDROID_HOME environment variable:
ANDROID_HOME=/usr/local/opt/android-sdk
System is a mac, but we seem to get the same issue in Docker. Anyone know how to get rid of this warning?
If you are using NDK, verify the ndk. dir is set to a valid NDK directory. It is currently set to /usr/local/opt/android-sdk/ndk-bundle. If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.
I had the same issue and solve it : Go to SDK location find NDK folder and check the folders if one of them is empty or corrupted delete it and let the android studio use the latest version you have. That was the working one.
Go to the "SDK Tools" page in the "Android SDK" menu. REMEMBER to check the checkbox "Show Package Details" at the lower right corner. You'll see all the NDK's you had installed, Un-check the NDK you'd like to uninstall and click "OK" at the bottom right to uninstall the selected NDK.
Please refer to these two links:
How to fix android studios 2.3 NDK bug?
https://github.com/requery/requery/issues/467
This is caused by upgrading to Android gradle plugin 2.3 (com.android.tools.build:gradle:2.3.0).
In previous versions of the plugin the databinding package name (where the BR file is generated) was provided on an annotation in a generate file. In the new version it's passed as a annotation processor option which is now handled.
An updated version will be available soon, a temporary workaround is to simply use the previous android gradle plugin 2.2.2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With