在Xcode中构建项目时出错

时间:2013-12-13 09:12:08

标签: ios objective-c xcode

构建项目时出现以下错误。

克莱宁也没有帮助。不知道突然出现了什么问题

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

3 个答案:

答案 0 :(得分:20)

由于此错误表明您有重复的图像AppIcon和LaunchImage。要对它进行排序,只需复制它并将其从项目中删除(查看Images.xcassets并将其删除)。之后再将其导入Images.xcassets。

答案 1 :(得分:2)

错误: AppIcon的多个实例(使用Storyboard时)。

此解决方案对我有用:

在Storyboard窗口的“导航”面板中查找Images.xcassets的重复列表。如果有,请突出显示并按删除键。询问时,选择“删除引用” - 不发送到垃圾箱(可能会删除实际的Images.xcassets文件夹)。显然,如果尝试中止将某些内容导入Images.xcassetes,则可能会出现项目中的重复列表。

答案 2 :(得分:2)

对我来说,问题是我的资产文件夹包含多个目标,而扩展程序已经分配了这些目标。修复是为了确保每个资产文件夹仅分配给其特定目标,或删除不需要的文件夹。

enter image description here