Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Could not get unknown property 'ndkVersion' for extension 'flutter' of type FlutterExtension"

Tags:

flutter

dart

I am really new to Flutter and Dart and while trying to compile my project i got this error:

FAILURE: Build failed with an exception.

* Where:

* What went wrong:
A problem occurred evaluating project ':app'.
> Could not get unknown property 'ndkVersion' for extension 'flutter' of type FlutterExtension.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s

what can i do to solve this?

I am using Visual Studo Code and just did a fresh install of Flutter from Git, already tried

flutter clean

and

flutter upgrade

but nothing seems to work

Thanks in advance and have a great day.

like image 978
alemomo Avatar asked Jan 25 '26 08:01

alemomo


2 Answers

Go to android>app>build.gradle and change flutter.ndkVersion to the latest stable version. You can check the latest ndk stable version here : https://developer.android.com/ndk/downloads

You go from this : before

to this : after

like image 193
Sidiki SAKO Avatar answered Jan 27 '26 01:01

Sidiki SAKO


Go to file => android\app\build.gradle

and edit ndkVersion flutter.ndkVersion to ndkVersion "23.1.7779620"

You can find out the latest version from the official website https://developer.android.com/ndk/downloads

like image 22
Mohamed Ayad Avatar answered Jan 27 '26 00:01

Mohamed Ayad



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!