XCode: 'Warning: Multiple build commands for output file' but I get error if I delete the duplicate

I get the errors:

Warning: Multiple build commands for output file /Users/me/Library/Developer/Xcode/DerivedData/myapp-csoyvdzaugzkszeagjrtzrfssudr/Build/Products/Debug-iphonesimulator/myapp.app/icon-72.png
Warning: Multiple build commands for output file /Users/me/Library/Developer/Xcode/DerivedData/myapp-csoyvdzaugzkszeagjrtzrfssudr/Build/Products/Debug-iphonesimulator/myapp.app/Default-Landscape@2x~ipad.png
Warning: Multiple build commands for output file /Users/me/Library/Developer/Xcode/DerivedData/myapp-csoyvdzaugzkszeagjrtzrfssudr/Build/Products/Debug-iphonesimulator/myapp.app/Default-Landscape~ipad.png

When I try to run my app in the simulator. I understand this is because of duplicate files. But when I remove either of the duplicates I get the errors:

error: /Users/me/Documents/Cordova27/myapp/myapp/Resources/icons/icon-72.png: No such file or directory

Does anyone know how to fix this at all? Have tried cleaning and restarting XCode to no avail.

Answers


Remove both,Add again.[Drag and drop at the icon field in the summary page]


open the Copy Bundle Resources Build Phase. find the twice files in that list and Delete the duplicate reference.


I moved bunch of images to a different folders and hit the same issue. To solve, basically go to build phases >> Copy Bundle Resources and remove earlier references as shown in the picture below. Note: Another thing to check is to see if you have multiple references of the files in the left panel (you will see 2 files with the same name)


If you set the splash/launch icon from Xcode (Targets -> Summary ...), the Xcode has an annoying feature that will copy your png file into the root folder, and after that you will get the warning for "Multiple build commands". What you need to do is, delete your png file used for splash/launch and also check the copy bundle resources in Target section and make sure your file has been removed from there. It will appear in red if the file is removed from your project and not removed from Copy bundle resources.


Add a new image(PNG) only via Copy Bundle Resources. Remove duplicates same way.


My problem was also in Copy Bundle Resources, but my cause was fast lane. All of my fastlane files name.txt, keywords.txt, marketing.txt, etc. were copied from each of my support languages into the bundle.

Go to your target Build Settings. In the search tool, enter the name of each fastlane file. In this case, you can delete all fastlane files. These are used for uploading your bundle to the App Store and so the files don't need to be in the bundle at all.


Need Your Help

How to add iFrame attributes, that will not validate as HTML5, via JQuery

javascript jquery html html5 iframe

I have some iFrames on an HTML5 page, each with the class "a-iframe". There are about 4 of these frames, all of different shapes and sizes, on the page.

How to get nice syntax error messages with Happy?

haskell happy

I am currently playing with the happy parser generator.