flutter Could not get unknown property ‘ndkVersion’

使用的 flutter 版本为 3.7.2 ,编译运行 如下
flutter Could not get unknown property ‘ndkVersion’_第1张图片
Could not get unknown property ‘ndkVersion’ for object of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension

解决方法是
在flutter-3.7.2\packages\flutter_tools\gradle\flutter.gradle配置如下
flutter Could not get unknown property ‘ndkVersion’_第2张图片
pluginProject.android.ndkVersion ?: ndkVersionIfUnspecified替换为ndkVersionIfUnspecified,
也就是去掉了这个判断

你可能感兴趣的:(Flutter项目开发全套教程,flutter)