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

启动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 用ns3仿真出5G核心网网元
  • ¥15 matlab答疑 关于海上风电的爬坡事件检测
  • ¥88 python部署量化回测异常问题
  • ¥30 酬劳2w元求合作写文章
  • ¥15 在现有系统基础上增加功能
  • ¥15 远程桌面文档内容复制粘贴,格式会变化
  • ¥15 关于#java#的问题:找一份能快速看完mooc视频的代码
  • ¥15 这种微信登录授权 谁可以做啊
  • ¥15 请问我该如何添加自己的数据去运行蚁群算法代码
  • ¥20 用HslCommunication 连接欧姆龙 plc有时会连接失败。报异常为“未知错误”