NDK at C:\Android\Sdk\ndk-bundle did not have a source.properties file code example
Example: 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 deprecatedand also conflicts with path:
ndk.dir=~/Library/Android/sdk/ndk-bundle