独立开发者张张 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 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵