Xcode warning: "Multiple build commands for output file"
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.
In the Project Navigator, select your Xcode Project file. This will show you the project settings as well as the targets in the project. Look in the "Copy Bundle Resources" Build Phase. You should find the offending files in that list twice. Delete the duplicate reference.
Xcode is complaining that you are trying to bundle the same file with your application two times.
This is easily caused when you add git based subprojects. Xcode isn't smart enough to ignore the .git subfolder even though you can't see it from finder, so it will get very confused that there are multiple files named "master" or "exclude", (standard git repo files). With Xcode4, go to the project (root of the left tree) then click your app target and expand "Copy Bundle Resources", then remove all the references to .git, you shouldn't need them baked into your app anyway.
Actually The answer to this is very simple.
In your xcode search for the files which raises the warning, and just delete it.
The Xcode will show only one reference of that file in the search results, but dont stop there, go ahead and delete it. (better make a back up to your project file before delete operation)
Now do a build, you will see the warning removed. (this answer is for a previous version of xcode)
链接地址: http://www.djcxy.com/p/58906.html