【问题标题】:Flutter Module won't build in iOSFlutter 模块不会在 iOS 中构建
【发布时间】:2021-11-27 08:47:51
【问题描述】:

我在尝试构建带有 Flutter 模块的 iOS 应用程序时遇到此错误。我在 pod 中添加了 FLUTTER_ROOT 和颤振依赖项已成功安装,但构建失败,出现此错误:

ERROR: Unknown FLUTTER_BUILD_MODE: vedur_dev.
Valid values are 'Debug', 'Profile', or 'Release' (case insensitive).
This is controlled by the FLUTTER_BUILD_MODE environment variable.
If that is not set, the CONFIGURATION environment variable is used.

You can fix this by either adding an appropriately named build
configuration, or adding an appropriate value for FLUTTER_BUILD_MODE to the
.xcconfig file for the current build configuration (Vedur_Dev).

我在 TARGETS 应用程序的用户定义设置中添加了 FLUTTER_BUILD_MODE,如下所示: 并分配了 iOS 理解的值。我清理了项目,但得到了完全相同的错误。 我不确定我在哪里犯了错误。

编辑:应用程序在没有模块的情况下构建得很好。

【问题讨论】:

    标签: xcode flutter xcodebuild xcode13 flutter-module


    【解决方案1】:

    我们也在构建系统中看到了这一点。问题似乎是颤振脚本无法弄清楚您正在运行哪种构建。因此,将FLUTTER_BUILD_MODE 环境变量设置为Release 进行修复。

    有效值为DebugProfileRelease

    Guide for setting enviroment variables for Xcode。 (Or via scripts.)

    【讨论】:

      猜你喜欢
      • 2020-11-19
      • 2020-02-18
      • 2020-03-03
      • 2021-12-17
      • 2021-08-09
      • 1970-01-01
      • 2021-08-08
      • 2020-07-11
      • 2021-09-26
      相关资源
      最近更新 更多