close

[Solved] ModelCache.safeGet(androidProjectResult.androidProject::getNdkVersion, “”) must not be null

Hello Guys, How are you all? Hope You all Are Fine. Today I have recently Updated my android studio to the Bumblebee 2021.1.1 And Now I am facing following error while syncing gradle files: om.intellij.openapi.externalSystem.model.ExternalSystemException: ModelCache.safeGet(androidProjectResult.androidProject::getNdkVersion, “”) must not be null in Android Studio. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How This Error Occurs ?

I have recently Updated my android studio to the Bumblebee 2021.1.1 And Now I am facing following error while syncing gradle files.

om.intellij.openapi.externalSystem.model.ExternalSystemException: ModelCache.safeGet(androidProjectResult.androidProject::getNdkVersion, “”) must not be null

How To Solve ModelCache.safeGet(androidProjectResult.androidProject::getNdkVersion, “”) must not be null Error ?

  1. How To Solve ModelCache.safeGet(androidProjectResult.androidProject::getNdkVersion, “”) must not be null Error ?

    To Solve ModelCache.safeGet(androidProjectResult.androidProject::getNdkVersion, “”) must not be null Error You Just need to specify ndkPath in your build.gradle in android Just Like This: android { ndkPath “E:/Android_installation/Sdk/ndk-bundle” } Then Sync your project again. And try to rebuild it. Now, Your error must be solved.

  2. ModelCache.safeGet(androidProjectResult.androidProject::getNdkVersion, “”) must not be null

    To Solve ModelCache.safeGet(androidProjectResult.androidProject::getNdkVersion, “”) must not be null ErrorYou Need to add ndk.dir in your project's local.properties Just add below line: ndk.dir=E\:\\Android_installation\\Sdk\\ndk-bundle And Then Open Your File From Top bar Of Your Android Studio and Go To Project Structure And Then select latest ndk version under Modules -> Properties, Now Your error must be solved.

Solution 1: add ndkPath in build.gradle

You Just need to specify ndkPath in your build.gradle in android Just Like This.

android {
  ndkPath "E:/Android_installation/Sdk/ndk-bundle" 
}

Then Sync your project again. And try to rebuild it. Now, Your error must be solved.

Solution 2: add ndk.dir to local.properties

You Need to add ndk.dir in your project’s local.properties Just add below line.

ndk.dir=E\:\\Android_installation\\Sdk\\ndk-bundle

And Then Open Your File From Top bar Of Your Android Studio and Go To Project Structure And Then select latest ndk version under Modules -> Properties, Now Your error must be solved.

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment