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.
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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With