【问题标题】:flutter can't build with Xcode11.3颤振无法使用 Xcode11.3 构建
【发布时间】:2019-12-15 01:26:04
【问题描述】:

更新 xcode 后,我无法使用 xcode 构建颤振代码。

每个工具都是
xcode 版本是 11.3
Flutter 1.12.13+hotfix.5 • 频道稳定
飞镖 2.7.0

日志如下。
我该如何解决?

...

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreMedia.fr
    amework/Headers/CoreMedia.h:15:10: note: in file included from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreMedia.fr
    amework/Headers/CoreMedia.h:15:
    #include <CoreMedia/CMFormatDescription.h>
             ^
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreMedia.fr
    amework/Headers/CMFormatDescription.h:26:10: error: could not build module 'CoreAudio'
    #include <CoreAudio/CoreAudioTypes.h>
             ^
    /Users/naohide_a/Workspace/flutter/sample/ios/Runner/Runner-Bridging-Header.h:1:9: note: in file included from
    /Users/naohide_a/Workspace/flutter/sample/ios/Runner/Runner-Bridging-Header.h:1:
    #import "GeneratedPluginRegistrant.h"
            ^
    /Users/naohide_a/Workspace/flutter/sample/ios/Runner/GeneratedPluginRegistrant.h:8:9: error: could not build module 'Flutter'
    #import <Flutter/Flutter.h>
            ^
    192 errors generated.
    <unknown>:0: error: failed to emit precompiled header
    '/Users/naohide_a/Library/Developer/Xcode/DerivedData/Runner-gfrbptjupluobbdhelljevlsxpqy/Build/Intermediates.noindex/PrecompiledHeaders/Runner-Bridging-He
    ader-swift_16EJIZIOPB8S-clang_KLU4EDN5EN1U.pch' for bridging header '/Users/naohide_a/Workspace/flutter/sample/ios/Runner/Runner-Bridging-Header.h'
    <unknown>:0: error: generate-pch command failed with exit code 1 (use -v to see invocation)
    note: Using new build system
    note: Planning build
    note: Constructing build description

Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.

【问题讨论】:

  • 你试过清理你的项目吗?看我的回答:stackoverflow.com/a/45607775/3231194
  • @Glenn 我刚刚构建了默认示例应用程序。它还没有 podfile。
  • 您是否尝试运行flutter clean?
  • @patreu22 是的,我做到了。

标签: ios xcode flutter


【解决方案1】:

我将 Flutter 降级到 v1.12.13+hotfix.6 并将 xcode 降级到 11.2.1。
最后对我来说很好。

【讨论】:

  • 你是怎么做到的?
猜你喜欢
  • 2021-08-04
  • 2020-11-26
  • 2020-10-05
  • 2021-10-15
  • 2021-01-07
  • 1970-01-01
  • 1970-01-01
  • 2018-08-21
相关资源
最近更新 更多