独立开发者张张 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 MICE包多重插补后数据集汇总导出
    • ¥15 一道算法分析问题(关于3-MSAT)
    • ¥15 C++ FLUENT 化学反应速率 编写困难
    • ¥15 Python嵌套交叉验证
    • ¥15 linuxkit+elasticsearch
    • ¥15 兄得萌6.13do题😭😭大一小东西的work
    • ¥15 投不到原始数据,gdal投影代码
    • ¥20 卷积混响的代码帮写。。
    • ¥88 借助代码处理雷达影像,识别任意区域洪水前后的被淹没区域,并可视化展示。
    • ¥100 提问关于声学两个频率合成后主观听觉问题