2011-09-18 158 views
1

當我建立我的項目,我收到此錯誤:命令/ usr/bin中/協同設計失敗,退出代碼1

CodeSign "build/Debug-iphoneos/MyApp.app" cd /Users/crackers/Desktop/MyApp/MyApp setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" setenv _CODESIGN_ALLOCATE_ /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate /usr/bin/codesign -f -s "iPhone Developer: xxxxxxx xxxxxxxx (D492H27WDR)" "--resource-rules=/Users/crackers/Desktop/MyApp/MyApp/build/Debug-iphoneos/MyApp.app/ResourceRules.plist" --entitlements "/Users/crackers/Desktop/MyApp/MyApp/build/MyApp.build/Debug-iphoneos/MyApp.build/MyApp.xcent" "/Users/crackers/Desktop/MyApp/MyApp/build/Debug-iphoneos/MyApp.app"

/Users/crackers/Desktop/MyApp/MyApp/build/Debug-iphoneos/MyApp.app: object file format invalid or unsuitable Command /usr/bin/codesign failed with exit code 1

我已經安裝了Xcode3.x和Xcode4.x(的iOS5測試版)兩在我的Mac。 幾個星期前一切工作正常。所有證書工作正常。 所有證書都處於良好狀態。

我搬到Xcode的(一個或多個)文件到新的目錄。之後,我得到這個錯誤。

回答

1

如果移動了Xcode的文件到一個新的目錄,你這樣做,那麼顯然你應該是默認的適當位置開發Xcode中重新安裝後,你得到這個錯誤。即時通訊運行iOS 5 Beta Xcode,並在適當的目錄中正常工作。首先完全卸載Xcode遵循這樣的網絡教程:http://macdevelopertips.com/xcode/how-to-uninstall-xcode.html

然後重新安裝Xcode在適當的地方,讓我知道這是否工作。恕我直言,它應該工作。

+0

我在/ Developer4中安裝了xcode_3.2.5_and_ios_sdk_4.2_final,在/ Developer4中安裝了xcode_4.2_and_ios_sdk_5_beta_6。它是否造成問題? – user951421

+0

是的,它可能是。完全刪除並在開發人員文件夾中安裝主Xcode,然後它應該可以工作。 –

+0

此外,如果這解決了您的問題,請隨時接受答案並投票! –

相關問題