flutter error: Multiple commands produce '/Users/****/build/ios/Debug-iphonesimulator/Runner.app/...

运行 flutter run 报错信息

 error: Multiple commands produce '/Users/mac/code/***build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework':
    1) Target 'Runner' has copy command from '/Users/mac/code/***/.ios/Flutter/engine/Flutter.framework' to
    '/Users/mac/code/***/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 iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.2.99. (in target 'Flutter')
    warning: The iOS Simulator deployment target is set to 5.0, but the range of supported deployment target versions for this platform is 8.0 to 12.2.99. (in target 'TMCache')
    warning: The iOS Simulator deployment target is set to 6.0, but the range of supported deployment target versions for this platform is 8.0 to 12.2.99. (in target 'Masonry')
    warning: The iOS Simulator deployment target is set to 5.0, but the range of supported deployment target versions for this platform is 8.0 to 12.2.99. (in target 'SDWebImage')
    warning: ignoring duplicated output file: '/Users/mac/code/gmalpha_flutter/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework' in shell script build phase '[CP] Embed Pods
    Frameworks'. This warning represents an extremely serious project misconfiguration and will likely cause some shell scripts in your project to be skipped entirely, leading to other build failures or
    missing files in the build directory. This will be a hard error in the future. (in target 'Runner')
    note: Using new build systemnote: Planning buildnote: Constructing build description

解决方案

  1. 使用旧版构建系统。打开ios / Runner.xcworkspace,并将构建系统更改为Legacy Build System
  2. 使用新的Xcode 10构建系统。打开ios / Runner.xcworkspace在项目导航器侧栏中选择Runner项目。在主视图中,选择Runner目标,然后选择Build Phases选项卡。展开Embed Frameworks阶段并从嵌入式框架列表中选择Flutter.framework。单击 - 从列表中删除Flutter.framework(确保保留App.framework)

下面贴个解决后的图

屏幕快照 2019-07-15 下午7.46.50.png

你可能感兴趣的:(flutter error: Multiple commands produce '/Users/****/build/ios/Debug-iphonesimulator/Runner.app/...)