2013-12-13 216 views
16

構建項目時出現以下錯誤。在Xcode中構建項目時出錯

Clening也沒有幫助。不知道突然怎麼回事

CompileAssetCatalog /Users/Mayu/Library/Developer/Xcode/DerivedData/Pizza_to_Go-dohdzfdfbyycqrhirbysuinqfuzf/Build/Products/Debug-iphonesimulator/Pizza\ to\ Go.app Pizza\ to\ Go/Images.xcassets Pizza\ to\ Go/Images.xcassets 
    cd "/Users/Mayu/Documents/development/git/pizzatogo/iPhoneApp/Pizza to Go" 
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" 
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency-info /Users/Mayu/Library/Developer/Xcode/DerivedData/Pizza_to_Go-dohdzfdfbyycqrhirbysuinqfuzf/Build/Intermediates/Pizza\ to\ Go.build/Debug-iphonesimulator/Pizza\ to\ Go.build/assetcatalog_dependencies.txt --output-partial-info-plist /Users/Mayu/Library/Developer/Xcode/DerivedData/Pizza_to_Go-dohdzfdfbyycqrhirbysuinqfuzf/Build/Intermediates/Pizza\ to\ Go.build/Debug-iphonesimulator/Pizza\ to\ Go.build/assetcatalog_generated_info.plist --app-icon AppIcon --launch-image LaunchImage --platform iphonesimulator --minimum-deployment-target 7.0 --target-device iphone --compress-pngs --compile /Users/Mayu/Library/Developer/Xcode/DerivedData/Pizza_to_Go-dohdzfdfbyycqrhirbysuinqfuzf/Build/Products/Debug-iphonesimulator/Pizza\ to\ Go.app /Users/Mayu/Documents/development/git/pizzatogo/iPhoneApp/Pizza\ to\ Go/Pizza\ to\ Go/Images.xcassets /Users/Mayu/Documents/development/git/pizzatogo/iPhoneApp/Pizza\ to\ Go/Pizza\ to\ Go/Images.xcassets 

/* com.apple.actool.errors */ 
: error: There are multiple app icon set instances named "AppIcon". 
: error: There are multiple launch image set instances named "LaunchImage". 
/* com.apple.actool.compilation-results */ 
/Users/Mayu/Library/Developer/Xcode/DerivedData/Pizza_to_Go-dohdzfdfbyycqrhirbysuinqfuzf/Build/Products/Debug-iphonesimulator/Pizza to Go.app/Assets.car 
/Users/Mayu/Library/Developer/Xcode/DerivedData/Pizza_to_Go-dohdzfdfbyycqrhirbysuinqfuzf/Build/Intermediates/Pizza to Go.build/Debug-iphonesimulator/Pizza to Go.build/assetcatalog_generated_info.plist 

回答

19

由於此錯誤說明你有重複的圖像AppIcon和LaunchImage。要對其進行排序,只需將其複製並從項目中移除(查看Images.xcassets並將其刪除)。之後再導入到Images.xcassets。

+1

我不確定在哪裏可以找到這些圖片。我收集了'images.xcassets'並使用項目頁面重新生成(從不使用asset catelog中更改。現在我有一個備份,但在哪裏可以找到要刪除的圖像? –

+0

我相信你刪除了項目的引用image.xcassets。直接進入項目目錄(finder)並從那裏拷貝它,然後刪除它並通過Xcode再次添加它。 – Greg

+0

輝煌,它的工作原理 –

2

錯誤: AppIcon的多個實例(使用Storyboard時)。

該解決方案爲我工作:

看故事板窗口的導航面板Images.xcassets的副本上市。如果有,請突出顯示它並按刪除鍵。當被問及時,選擇「刪除參考」 - 不發送到垃圾(這可能會刪除實際的Images.xcassets文件夾)。顯然,如果嘗試中止將某些內容導入到Images.xcassetes中,則可能會出現該項目中的重複列表。

2

對我來說,問題是我的資產文件夾有多個目標,而擴展已經有了這些目標分配。修復的目的是確保每個資產文件夾僅分配給其特定目標,或刪除不需要的文件夾。

enter image description here