ios - Flutter - 命令 PhaseScriptExecution 失败,退出代码非零

标签 ios xcode flutter

这个问题在这里已经有了答案:





Flutter run - Failed to build iOS app - Command PhaseScriptExecution failed with a nonzero exit code

(3 个回答)


去年关闭。




我正在尝试存档和构建 flutter IOS 项目,以便最终生成 IPA,但由于此错误而苦苦挣扎,我尝试遵循有关 similar 的现有问题我无法理解的问题:

../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:88:26: Error: Type 'DiagnosticableMixin' not found.
class PictureStream with DiagnosticableMixin {
                         ^^^^^^^^^^^^^^^^^^^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:192:44: Error: Type 'DiagnosticableMixin' not found.
abstract class PictureStreamCompleter with DiagnosticableMixin {
                                           ^^^^^^^^^^^^^^^^^^^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:88:7: Error: The type 'DiagnosticableMixin' can't be mixed in.
class PictureStream with DiagnosticableMixin {
      ^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:192:16: Error: The type 'DiagnosticableMixin' can't be mixed in.
abstract class PictureStreamCompleter with DiagnosticableMixin {
               ^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:167:11: Error: Superclass has no method named 'debugFillProperties'.
    super.debugFillProperties(properties);
          ^^^^^^^^^^^^^^^^^^^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:171:30: Error: The method 'toStringShort' isn't defined for the class 'PictureStreamCompleter'.
 - 'PictureStreamCompleter' is from 'package:flutter_svg/src/picture_stream.dart' ('../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart').
Try correcting the name to the name of an existing method, or defining a method named 'toStringShort'.
      ifPresent: _completer?.toStringShort(),
                             ^^^^^^^^^^^^^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:266:11: Error: Superclass has no method named 'debugFillProperties'.
    super.debugFillProperties(description);
          ^^^^^^^^^^^^^^^^^^^

Command PhaseScriptExecution failed with a nonzero exit code

导致此问题的原因是什么?

最佳答案

我的情况是这样的,我用了websafe_svg 1.1.0这取决于 flutter_svg ^0.17.4 .并按照 的建议@Lutaaya Huzaifah Idris 此问题已在 flutter_svg: ^0.18.0 的最新更新中得到修复。 .
所以如果你使用 websafe_svg然后在 pubspec.yaml 中添加以下几行来解决这个问题,

dependency_overrides:
  flutter_svg: ^0.18.0

关于ios - Flutter - 命令 PhaseScriptExecution 失败,退出代码非零,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62449072/

相关文章:

ios - 从编程 uibutton 属性访问全局变量

firebase - Flter-FutureBuilder-未获取 AsyncSnapshot 数据

flutter - 如何在页面加载时在 Listview 上应用自动滚动

ios - 如何在Flutter中使用sqflite插入特殊字符?

ios - 如何从 UI 测试访问 App Delegate?

ios - 来自远程 I/O 单元的原始音频数据的测量单位是什么?

ios - 在 SwiftyCharts 中显示 JSON 多色

objective-c - ALAssetPropertyDate 返回 "wrong"日期

iphone - 如何从 Xcode 4 标记 Git 存储库

objective-c - 在 XCode 调试器中显示 NSDecimal 值