When I Updated the Android Studio to the Bumblebee 2021.1.1 I got this error:
ModelCache.safeGet(androidProjectResult.androidProject::getNdkVersion, "") must not be null
I have already added ndk.dir to local.properties but I still have the error.
sdk.dir=/path/to/sdk
ndk.dir=/path/to/ndk
CodePudding user response:
ndk.dir=/path/Android/Sdk/ndk
sdk.dir=/path/Android/Sdk
Try to define like this
CodePudding user response:
The value for ndk.dir should no longer be set in your app's local.properties file, and support for this ndk.dir setting will be removed in a future version. The Android Gradle Plugin sets the NDK version by default, but if you need a specific version of the NDK, you can set android.ndkVersion in build.gradle.
- Remove
ndk.dir=/path/to/ndkfrom the local.properties. - go to
build.gradleunder android section addndkVersion='required ndk version'
ex:
android {
ndkVersion '23.1.7779620'
}
Reference : Android office doc's
