1进胯、Multiple commands produce
error: Multiple commands produce
'/Users/galahad/Library/Developer/Xcode/DerivedData/xxxxx-drnrntneloepunakcqbcdycudqeh/Build/Products/Debug-iphoneos/xxxxx.app':
1)Target 'xxxxx' has create directory command with output
'/Users/galahad/Library/Developer/Xcode/DerivedData/xxxxx-drnrntneloepunakcqbcdycudqeh/Build/Products/Debug-iphoneos/xxxxx.app'
2)That command depends on command in Target 'xxxxx': script phase “[CP] Copy Pods Resources”
錯誤原因:
Xcode 10 默認(rèn)使用的Build System是New Build System
,與Xcode9不同原押。
解決方法:
1)方法一:移除Target -> Build phase -> Copy Pods Resources -> Output Files ->{TARGET_BUILD_DIR}/{UNLOCALIZED_RESOURCES_FOLDER_PATH}
胁镐。這個方法解決不徹底,重新pod install
后,這個path會重新出現(xiàn)盯漂,需要重新刪除颇玷。
2)方法二:修改Build System。通過Xcode菜單欄 -> File -> Workspace Setting
就缆,將Build System修改為Legacy Build System
帖渠。
2、Jenkins打包時提示Multiple commands produce...违崇,但真機測試沒問題
錯誤原因:
Jenkins打包時默認(rèn)使用的是New build system
阿弃,而不管你Xcode里是如何設(shè)置的诊霹。
解決方法:
archive時添加xcodebuild指令-UseModernBuildSystem=NO
羞延,指定不使用當(dāng)前的編譯系統(tǒng)。參考:How can I use the legacy build system with Xcode 10's xcodebuild脾还?
3伴箩、 library not found for -lstdc++.6.0.9
ld: library not found for -lstdc++.6.0.9
clang: error: linker command failed with exit code 1 (use -v to see invocation)
錯誤原因:
Xcode10中已去除這個library。項目中有用到的話鄙漏,可以從舊版本Xcode中copy一份過來嗤谚。
解決方法:
從舊版本Xcode的library復(fù)制一份libstdc++.6.0.9.tbd
,放到Xcode10對應(yīng)目錄下怔蚌。
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib
(真機)
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib
(模擬器)
4巩步、Cycle inside xxxxx; build could produce unreliable results
Cycle inside xxxxx; build could produce unreliable results.
This can usually be resolved by moving the app extension embedding build phase to the end of the list.
Cycle details:xxxxx
解決方法:
根據(jù)提示,在Target ->Build Phases
下桦踊,把Embed APP Extensions
移動到列表末尾椅野,問題解決。
5籍胯、訊飛語音識別SDK報錯
Undefined symbols for architecture arm64:
"_OBJC_CLASS$CNContactStore", referenced from:
objc-class-ref in iflyMSC(IFlyContact.o)
"_OBJC_CLASS$_CNContactFetchRequest", referenced from:
objc-class-ref in iflyMSC(IFlyContact.o)
"_CNContactGivenNameKey", referenced from:
-[IFlyContact fetchContactWithContactStore:] in iflyMSC(IFlyContact.o)
"_CNContactFamilyNameKey", referenced from:
-[IFlyContact fetchContactWithContactStore:] in iflyMSC(IFlyContact.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
錯誤原因:
找不到與Contact相關(guān)的key竟闪。
解決方法:
添加Contacts.framework
。