Xcode升级到14.3或15.0后编译失败,完整错误日志如下:
Error (Xcode): SDK does not contain 'libarclite' at the path '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a'; try increasing the minimum deployment target
或者
File not found: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a
解决方法:添加缺失的文件即可
1、下载文件
https://github.com/wnkpzzz/CZLibarclite-Files/tree/main
2、进入目录 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib
3、新建文件夹 arc
4、把第一步下载的文件全部copy到arc目录里面
5、修改编译脚本
文件目录:
原生App项目路径:Pods\Target Support Files\Pods-App\Pods-App-frameworks.sh
Flutter App项目路径:Pods\Target Support Files\Pods-Runner\Pods-Runner-frameworks.sh
打开文件Pods-Runner-frameworks.sh 搜索(CMD+F):source="$(readlink "${source}")"
替换成:source="$(readlink -f "${source}")"
6、重启xcode,重新run