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
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…