flutter Could not get unknown property ‘ndkVersion’

The flutter version used is 3.7.2, compile and run as follows
insert image description here
Could not get unknown property 'ndkVersion' for object of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension

The solution is
to configure the following in flutter-3.7.2\packages\flutter_tools\gradle\flutter.gradle
insert image description here
pluginProject.android.ndkVersion ?: ndkVersionIfUnspecified is replaced by ndkVersionIfUnspecified,
that is, this judgment is removed

Guess you like

Origin blog.csdn.net/zl18603543572/article/details/132646398