xcode15問題合集
SDK does not contain 'libarclite' : /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/
報錯的情況下沒有arc文件夾,也沒有l(wèi)ibarclite_iphonesimulator.a文件,
1谱煤、新建arc文件夾
2、下載:https://github.com/kamyarelyasi/Libarclite-Files中的libarclite_iphonesimulator.a
3、將下載下來的文件粘貼到arc文件夾下
(libarclite_iphoneos.a真機的也可以一起加進去)
徹底關(guān)閉并重新啟動xcode席噩,重新運行后將修復(fù)這個問題
ld: 11 duplicate symbols clang: error: linker command failed with exit code 1 (use -v to see invocation)
升級到Xcode 15后匾浪,原先Xcode14可以編譯的項目出現(xiàn)大量Duplicate symbols锰瘸,且引用報錯指向同一個路徑(一般為Framework)下的同一個文件儒拂。經(jīng)過查找相關(guān)解決桌肴,可通過添加設(shè)置改正皇筛。
Xcode 15 這個報錯的解決方法:
在Build Settings中的Other Linker Flags中添加-ld64可解決,路徑Xcode -> Target -> Build Setting -> Other Linker Flags
如果報警告 -ld64 is deprecated, use -ld_classic instead ,換成下面方案:
在Xcode -> Target -> Build Setting -> Other Linker Flags 添加一行"-ld_classic" 即可解決該問題
打包arichive時報錯坠七,信息如下:
rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/9e200cfa-7d96-11ed-886f-a23c4f261b56/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9] Command PhaseScriptExecution failed with a nonzero exit code
** ARCHIVE FAILED **
The following build commands failed: PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/davin/Library/Developer/Xcode/DerivedData/aiFriend-fxlyidyegbhohlefkuwesixdmzsy/Build/Intermediates.noindex/ArchiveIntermediates/aiFriend/IntermediateBuildFilesPath/aiFriend.build/Debug-iphoneos/aiFriend.build/Script-D2D7ABCE635BD72190BED51F.sh (in target 'aiFriend' from project 'aiFriend') (1 failure)
找到…-frameworks.sh 文件水醋,替換
source="$(readlink "${source}")"
為
source="$(readlink -f "${source}")"
具體做法是:全局搜要替換的source="$(readlink "${source}")",然后再把它替換為正確的source="$(readlink -f "${source}")"彪置,再次編譯即可成功拄踪。