NDK at ~/Library/Android/sdk/ndk-bundle did not have a source.properties file
After specifying ndk version in build.gradle
file it is working
android {
ndkVersion '21.3.6528147'
}
And inside local.properties
remove the following since it's deprecated and also conflicts with path:
ndk.dir=~/Library/Android/sdk/ndk-bundle
I had this error in Flutter.
my solution:
copy file C:\Users\username\AppData\Local\Android\Sdk\ndk\22.1.7171670\source.properties
to
C:\Users\username\AppData\Local\Android\Sdk\ndk-bundle
Ready!
For Android studio 4.1.1+ (gradle-plugin
: 4.1.1 or above) use ndkVersion
No
ndk.dir
atlocal.properties
. If there is, remove it
build.gradle (module)
android {
defaultConfig {
// ...
ndkVersion = "21.1.6352462"
}
}
Note: The specified version must exist at $SDK/ndk
folder.
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.