1、升級(jí)Xcode到Version 10.0 (10A255)后,運(yùn)行已有項(xiàng)目,報(bào)如下錯(cuò)誤: error: Multiple commands produce '/Users/galahad/Library/Developer/Xcode/DerivedData/yoowei-drnrntneloepunakcqbcdycudqeh/Build/Products/Debug-iphoneos/yoowei.app': 1) Target 'yoowei' has create directory command with output '/Users/galahad/Library/Developer/Xcode/DerivedData/yoowei-drnrntneloepunakcqbcdycudqeh/Build/Products/Debug-iphoneos/yoowei.app' 2) That command depends on command in Target 'yoowei': script phase “[CP] Copy Pods Resources”
原因:Xcode 10 默認(rèn)使用的build system是New build system,與Xcode9不同導(dǎo)致。 解決:2種方法 1)第一種方法 不修改build system 根據(jù)error 日志,script phase “[CP] Copy Pods Resources”,而且與 error: Cycle in dependencies between targets 'yooweiExtension' and 'yoowei'; building could produce unreliable results. Cycle path: yooweiExtension → yoowei → yooweiExtension Cycle details: → Target 'yooweiExtension': CodeSign /Users/galahad/Library/Developer/Xcode/DerivedData/yoowei-drnrntneloepunakcqbcdycudqeh/Build/Products/Debug-iphoneos/yooweiExtension.appex ○ Target 'yooweiExtension': ProcessProductPackaging /Users/galahad/Library/Developer/Xcode/DerivedData/yoowei-drnrntneloepunakcqbcdycudqeh/Build/Intermediates.noindex/yoowei.build/Debug-iphoneos/yooweiExtension.build/yooweiExtension.appex.xcent ○ Target 'yooweiExtension' has target dependency on Target 'yoowei' → Target 'yoowei' has target dependency on Target 'yooweiExtension' ○ That command depends on command in Target 'yooweiExtension': script phase “[CP] Check Pods Manifest.lock” 對(duì)應(yīng)的解決方案:選中項(xiàng)目target -> Build phase -> Target Dependencies 去掉相互的依賴即可
2)第二種方法 修改build system (個(gè)人感覺(jué)這種方式較好,不會(huì)每個(gè)項(xiàng)目搞一遍)
2、典型問(wèn)題 ld: library not found for -lstdc++.6.0.9 clang: error: linker command failed with exit code 1 (use -v to see invocation) 解決方案:(我一般升級(jí)xcode 之前都會(huì)將lib 給備份一份。具體路徑是:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib ) 1、提前在xcode 9中 根據(jù)路徑 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib 找到 libstdc++.6.0.9.tbd 備份 2、復(fù)制剛才的libstdc++.6.0.9.tbd 文件,手動(dòng)添加到 升級(jí)后的xcode 10 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib 文件夾中,運(yùn)行即可。 需要的話,可以找我要。
|
|
來(lái)自: 嘆落花 > 《iOS異常處理與錯(cuò)誤》