Go to your Dart SDK folder and open the ndk directory.
Inside, you may find multiple NDK versions. Identify the latest version based on the name.
Copy the latest NDK version number, for example, 29.0.13599879.
In your Flutter project, navigate to the build.gradle or build.gradle.kts file at the app level.
Locate the android section and find the line:
ndkVersion = flutter.ndkVersion
replace with
ndkVersion = "29.0.13599879"
After making this change, run flutter clean and then pub get to ensure your project recognizes the updated NDK.
Enjoy