【问题标题】:Flutter failed to build sample iOS app on VS CodeFlutter 无法在 VS Code 上构建示例 iOS 应用程序
【发布时间】:2018-08-26 14:45:00
【问题描述】:

我正在尝试在 VS 代码上构建 Flutter 示例项目,但收到此消息...该示例正在 Android 设备上构建和运行良好,我还尝试在 iOS 模拟器上使用 Android Studio 运行示例也很好。它只是不适用于 VS Code。有没有人遇到同样的问题?

颤振:v0.2.2

Launching lib/main.dart on iPhone 8 in debug mode...
Xcode build done
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
/Users/Sean/Documents/myapp/build/ios/Debug-iphonesimulator/Runner.app:resource fork, Finder information, or similar detritus not allowed
Command /usr/bin/codesign failed with exit code 1
Could not build the application for the simulator.
Error launching application on iPhone 8.
Exited (sigterm)

【问题讨论】:

  • 如果您尝试使用flutter run 从命令行运行会发生什么?如果您仍然有问题,您可以在github.com/Dart-Code/Dart-Code/issues/new 开一个案例吗(或抓住我 - DanTup - 在 Gitter)?

标签: ios visual-studio-code ios-simulator flutter


【解决方案1】:

这是 Xcode 构建系统中的一项新安全措施。

您可以在这里详细了解:https://stackoverflow.com/a/39667628/6622328

为了快速修复,只需在重建之前清理应用程序(flutter clean)。

【讨论】:

    【解决方案2】:

    我怀疑你没有安装 XCode,或者没有为你的开发者 ID 启用你的 Runner 项目。

    【讨论】:

    • 我确实安装了 XCode,并且正在使用模拟器。应该不需要开发者ID吧?
    猜你喜欢
    • 2018-09-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-24
    • 2021-09-21
    • 1970-01-01
    • 2022-07-25
    • 2021-01-15
    • 2021-08-31
    相关资源
    最近更新 更多