Xcode warning: “Multiple build commands for output

2019-01-07 01:56发布

I am getting an error like this:

[WARN]Warning: Multiple build commands for output file /Developer/B/Be/build/Release-iphonesimulator/BB.app/no.png

[WARN]Warning: Multiple build commands for output file /Developer/B/Be/build/Release-iphonesimulator/BB.app/d.png

[WARN]Warning: Multiple build commands for output file /Developer/B/Be/build/Release-iphonesimulator/BB.app/n.png

But I have checked Xcode and I don't see any duplicates of such files at all. As this post in the Apple Mailing Lists say, there are no duplicates.

20条回答
时光不老,我们不散
2楼-- · 2019-01-07 02:27

In my case the issue was caused by the same name of target and folder inside a group.

Just rename conflicted file or folder to resolve the issue.

查看更多
走好不送
3楼-- · 2019-01-07 02:30

another version of this situation can occur when there are duplicates in the Headers build phase.

to fix this …

  1. go to your project target
  2. choose Build Phases
  3. choose the Headers build phase
  4. enter the name shown in the warning
  5. notice the two (or more) items
  6. find the +|- boxes in the lower left corner
  7. select one of the items, and click the - button
查看更多
登录 后发表回答