ios - iOS Xcode 10 的 Flutter 构建失败

标签 ios flutter xcode10

我将 Flutter 升级到了最新版本。以下是医生的输出

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.8.2, on Mac OS X 10.14 18A326h, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.1)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
[✓] Android Studio (version 3.1)
[✓] VS Code (version 1.27.1)

当我以 iOS 模拟器为目标运行应用程序时,我得到了这个

Launching lib/main.dart on iPhone XS Max in debug mode...
Starting Xcode build...
Xcode build done.
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode's output:
↳
    error: Multiple commands produce '/Users/kalehv/dev/todo/todo-flutter/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework':
    1) Target 'Runner' has copy command from '/Users/kalehv/dev/todo/todo-flutter/ios/Flutter/Flutter.framework' to '/Users/kalehv/dev/todo/todo-flutter/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework'
    2) That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks”
    warning: The use of Swift 3 @objc inference in Swift 4 mode is deprecated. Please address deprecated @objc inference warnings, test your code with “Use of deprecated Swift 3 @objc inference” logging enabled, and then disable inference by changing the "Swift 3 @objc Inference" build setting to "Default" for the "Runner" target. (in target 'Runner')
    warning: ignoring duplicated output file: '/Users/kalehv/dev/todo/todo-flutter/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework' (in target 'Runner')
    note: Using new build systemnote: Planning buildnote: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone XS Max.

最佳答案

我认为这至少对我有用 url .

打开你的Xcode,在Apple图标旁边的左上角有File,然后打开Workspace Settings并将构建系统更改为遗留构建系统

关于ios - iOS Xcode 10 的 Flutter 构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52445519/

相关文章:

ios - Stripe 确认 Swift 卡的详细信息

ios - 如何使用自动布局为纵向和横向配置不同的布局?

canvas - Flutter:开始使用 Canvas

ios - Flutter:无法在 build/ios/iphonesimulator/Runner.app 找到构建的应用程序包

ios - Xcode 10 自动完成在其他 swift 文件中不起作用

swift - 为什么 Xcode 不能识别新创建的 UIView?

objective-c - PresentModalViewController 与导航 Controller 中的推送 View 具有相同的动画?

android - Android Studio 中缺少数据库检查器

ios - Xcode剪贴板: Copy & Paste stuck

ios - 如何在每次运行应用程序时清理沙箱?