Flutter项目在ios13上运行

时间:2019-10-16 03:47:25

标签: ios flutter

我只是将系统更新到最新的MacOS 10.15,将Xcode更新到11,我的iPhone XR也更新到了iOS 13.1。我运行我的flutter项目,然后在这里出错

日志

Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    error: Multiple commands produce '/Users/eriklu/development/codes/flutter/study/flutter_trip/demo/flutter_base_demo/build/ios/Debug-iphoneos/Runner.app/Frameworks/Flutter.framework':
    1) Target 'Runner' has copy command from '/Users/eriklu/development/codes/flutter/study/flutter_trip/demo/flutter_base_demo/ios/Flutter/Flutter.framework' to '/Users/eriklu/development/codes/flutter/study/flutter_trip/demo/flutter_base_demo/build/ios/Debug-iphoneos/Runner.app/Frameworks/Flutter.framework'
    2) That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks”
    note: Using new build systemnote: Planning buildnote: Constructing build descriptionwarning: duplicate output file '/Users/eriklu/development/codes/flutter/study/flutter_trip/demo/flutter_base_demo/build/ios/Debug-iphoneos/Runner.app/Frameworks/Flutter.framework' on task: PhaseScriptExecution [CP] Embed Pods Frameworks /Users/eriklu/Library/Developer/Xcode/DerivedData/Runner-cguezvpzlkcjmwafakhebgbckazf/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/Script-73506C6A4A6DF54A6CA02CB5.sh (in target 'Runner' from project 'Runner')

Could not build the precompiled application for the device.

Error launching application on 路过的程序猿.

1 个答案:

答案 0 :(得分:0)

尝试打开Xcode并进入 Runner 的设置,然后打开 Build Phases 标签。 转到“嵌入式框架”,您肯定会看到 Flutter.framework App.Framework

Xcode screenshot

检查实际上在更新过程中Xcode并未损坏Framework中的文件,通常可以通过查看图标来查看它,但也可以使用右键并在Finder中查看它。

如果您应该看到禁用的图标或无法在Finder中打开它,则解决方案非常简单,您只需在Flutter中创建一个新应用程序并替换

中的Framework文件夹(对于iOS)

yourAppName / ios / Flutter /