處理錯(cuò)誤 Xcode 編譯找不到文件 libarclite_iphonesimulator.a

視頻
https://youtu.be/ZBMFs2PwkB4
錯(cuò)誤描述
Error?(Xcode):?File?not?found:?/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a
Error?(Xcode):?Linker?command?failed?with?exit?code?1?(use?-v?to?see?invocation)

分析
libarclite_iphonesimulator.a 這個(gè)文件是 ARC 自動(dòng)釋放內(nèi)存的功能。
引起的問題是你的項(xiàng)目很新,但是編譯目標(biāo)太老,然后呢,沒有這個(gè)文件。
你需要把這個(gè)文件復(fù)制到 .../arc/ 目錄下。
還有一個(gè)辦法直接修改 IPHONEOS_DEPLOYMENT_TARGET 編譯目標(biāo)為 ios 11,就好了。這只對(duì)新項(xiàng)目有效。
解決
代碼方式
ios/Podfile
批量修改所有的依賴項(xiàng)目標(biāo)版本號(hào)
post_install?do?|installer|
??installer.pods_project.targets.each?do?|target|
????flutter_additional_ios_build_settings(target)
????#?add?修改項(xiàng)目配置
????if?target.platform_name?==?:ios
??????target.build_configurations.each?do?|config|
??????????config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']?=?'11.0'?#?將11.0替換為您需要的目標(biāo)版本號(hào)
??????end
????end
????#?add?end
??end
end
執(zhí)行命令
$?cd?ios
$?pod?update
手動(dòng)方式
手動(dòng)修改每個(gè)依賴包的部署最小版本為 ios 11.0

可能遇到的問題
[!]?Invalid?Podfile?file:?[!]?Specifying?multiple?post_install?hooks?is?unsupported
這個(gè)錯(cuò)誤意味著您在 Podfile 文件中指定了多個(gè) post_install
鉤子,而 CocoaPods 不支持這種做法。要解決這個(gè)問題,您需要將多個(gè) post_install
鉤子合并為一個(gè)。
? 貓哥 ducafecat.com
end文章來源:http://www.zghlxwxcb.cn/news/detail-499364.html
本文由 mdnice 多平臺(tái)發(fā)布文章來源地址http://www.zghlxwxcb.cn/news/detail-499364.html
到了這里,關(guān)于處理錯(cuò)誤 Xcode 編譯找不到文件 libarclite_iphonesimulator.a的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!