【问题标题】:Flutter IOS product flavors not runningFlutter IOS 产品风味未运行
【发布时间】:2021-03-07 01:57:01
【问题描述】:

我在我的 Flutter 应用中实现了产品风格,并且添加了三个不同的 google-services.plist 文件。现在,当我尝试运行我的 ios 应用程序时,它会引发此错误。 我关注了这个中型帖子link

Xcode 的输出:

error: Multiple commands produce
'/Users/abc/MarkiTech/pulscare_mobile/build/ios/Debug-development-iphonesimulator/Runner.app/GoogleService-Info.plist':
1) Target 'Runner' (project 'Runner') has copy command from '/Users/abc/Downloads/development/GoogleService-Info.plist' to
'/Users/abc/MarkiTech/pulscare_mobile/build/ios/Debug-development-iphonesimulator/Runner.app/GoogleService-Info.plist'
2) Target 'Runner' (project 'Runner') has copy command from '/Users/abc/Downloads/master/GoogleService-Info.plist' to
'/Users/abc/MarkiTech/pulscare_mobile/build/ios/Debug-development-iphonesimulator/Runner.app/GoogleService-Info.plist'
3) Target 'Runner' (project 'Runner') has copy command from '/Users/abc/Downloads/stage/GoogleService-Info.plist' to
'/Users/abc/MarkiTech/pulscare_mobile/build/ios/Debug-development-iphonesimulator/Runner.app/GoogleService-Info.plist'

【问题讨论】:

  • 你的Runner目标的Bundle Resources是否包含GoogleService-Info.plist

标签: ios firebase flutter


【解决方案1】:

如果您的 Runner 目标在 Bundle Resources 中包含 GoogleService-Info.plist,请尝试以下操作:

  1. 在 Xcode 中打开您的 iOS 工作区
  2. 在项目导航器中点击 Runner 项目(带有文件的左侧面板)
  3. 点击目标列表中的Runner
  4. 转到Build Phases 选项卡
  5. 展开Copy Bundle Resources
  6. 从捆绑资源中删除 GoogleService-Info.plist

【讨论】:

  • 问题已解决。在复制包资源中有两个 GoogleServices-Info.plist。删除了一个,它工作正常。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-06-07
  • 1970-01-01
  • 2016-08-29
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多