今天到了新公司,装了xcode4.0.2,随便建了一个工程,总会有十多个错误导致编译失败:

错误如下:

error: unable to create '/Users/[用户名]/Library/Developer/Xcode/DerivedData/gfhfgh-edhpobgjmxjmsmgimuzpzwmrvgaq/Build/Intermediates' (Permission denied)

Unable to create directory /Users/moqi/Library/Developer/Xcode/DerivedData/gfhfgh-edhpobgjmxjmsmgimuzpzwmrvgaq/Build/Intermediates/gfhfgh.build/Debug-iphonesimulator/gfhfgh.build/Objects-normal/i386

The file “Info.plist” doesn’t exist.

大致如上,

解决方法:打开终端输入:sudo chmod -R 777 /Users/[your user directory]/Library/Developer/  

 
For some reason, when installing Cocos2d, it also modified the file permission? Anyway, did not look into that since it is working now.

原文地址:http://www.iphonewarroom.com/2011/07/how-to-fix-warning-couldnt-add.html