独立开发者张张 2021-07-17 23:22 采纳率: 100%
浏览 23
已结题

启动Flutter项目Xcode报错,image_provider.dart:670

启动Flutter项目Xcode报错,报错信息如下

Launching lib/main.dart on iPhone 11 Pro in debug mode...
lib/main.dart:1
Xcode build done.                                           29.5s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **
Xcode's output:
↳
    ../../../Development/flutter/packages/flutter/lib/src/painting/image_provider.dart:670:8: Error: Getter not found: 'overrethrow'.
          @overrethrow;
           ^^^^^^^^^^^
    ../../../Development/flutter/packages/flutter/lib/src/painting/image_provider.dart:670:8: Error: This can't be used as metadata; metadata should be a reference to a compile-time constant variable, or a call to a constant constructor.
          @overrethrow;
           ^
    ../../../Development/flutter/packages/flutter/lib/src/painting/image_provider.dart:670:19: Error: Expected an identifier, but got ';'.
    Try inserting an identifier before ';'.
          @overrethrow;
                      ^
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Analyzing workspace
    note: Constructing build description
    note: Build preparation complete
    /Users/zhangbing/Downloads/code/bizhi_app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'Flutter' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro.
Exited (sigterm)

flutter版本: 2.0.4
编辑器:VS Code

尝试过 flutter clean 命令,没有解决。

stackoverflow.com上有个类似的问题:imageprovider-bug-flutter

  • 写回答

1条回答 默认 最新

  • 全栈CV工程师 2022-10-09 18:51
    关注

    错误字面意思就是模拟器版本高于你程序支持的版本。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 4月20日
  • 已采纳回答 4月12日
  • 创建了问题 7月17日

悬赏问题

  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了