A problem NDK not configured. Download it with SDK manager. Preferred NDK version is '27.0.12077973'

Hi everyone,I’m trying to build my Flutter app for Android, but I’m running into the following error:

text

Apply to main.dart

  • Where:

Build file ‘E:\devE\js\nsang19\flutter\fl2\android\build.gradle.kts’ line: 16

  • What went wrong:

A problem occurred configuring project ‘:app’.

NDK not configured. Download it with SDK manager. Preferred NDK version is ‘27.0.12077973’.

I have downloaded a ndk , android studio doesn’t give me the option to download that specific one tho.

Any help would be appreciated! Thanks in advance.

I think there’s a line in the error that tells you to define the version in your build.gradle file

I don’t know why this is still happening

I think it’s this and it’s still open

Update your gradle file with:
android {
ndkVersion = “27.0.12077973”
// … other config
}
save and in terminal (I use vs code so i do not know much about AS.
Do flutter clean && flutter pub get
Hope this helps