NDK at ~/Library/Android/sdk/ndk-bundle did not have a source.properties file
Solution 1:
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 deprecatedand also conflicts with path:
ndk.dir=~/Library/Android/sdk/ndk-bundle
Solution 2:
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.