Xcode warning: “Multiple build commands for output file”

前端 未结 23 1554
既然无缘
既然无缘 2020-11-28 17:29

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

<
相关标签:
23条回答
  • 2020-11-28 18:06

    This happens if you have 2 files with the same name in the project. Even though files are in groups in XCode when the project is compiled all of the files end up in the same directory. In other words if you have /group1/image.jpg and /group2/image.jpg the compiled project will only have one of the two image.jpg files.

    0 讨论(0)
  • 2020-11-28 18:09

    One of simple way is,

    • Go to App target
    • Go to Build Phases
    • Output files
    • Delete path of out put files, then build project. It will run successfully.
    0 讨论(0)
  • 2020-11-28 18:12

    Actually, the answer to this is quite simple.

    In your Xcode project search for the files which raise the warning, and just delete one of them.

    Xcode will show only one reference of that file in the search results, but don't stop there, go ahead and delete it. (it's better to make a backup of your project file before deleting it)

    Now build the project again. The warning should disappear now. (this answer is for a previous version of xcode)

    0 讨论(0)
  • 2020-11-28 18:12

    This happends because ur "no.png" "d.png" and "n.png" are duplicated in resources . Just look for delete dublicated files and delete.

    0 讨论(0)
  • 2020-11-28 18:13

    For me the Target > Build Settings > Packaging > Product Name was set to the same thing as another value referenced in a .plist file which was custom to my app. Eventually due to our build process this creates duplicate files.

    0 讨论(0)
  • 2020-11-28 18:13

    Swift 3: (but also the older versions) it happen when I have assets with duplicates. Just rename the files with this issue and all go well.

    It could happen also when you have made a Assets.xcassets and you have renamed the duplicates with new names so after time you forgot it and remove it to add the folder references but this one return to the duplicate files problem..

    0 讨论(0)
提交回复
热议问题