Flutter 项目运行到ios模拟器报错 : Error (Xcode): SDK does not contain 'libarclite'
Flutter 项目运行到ios模拟器报错:
Error (Xcode): SDK does not contain 'libarclite' at the path '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a'; try increasing the minimum deployment target
修改Podfile文件:
在
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
后面添加
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
end
end
end
最后变成:
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
end
end
end
end
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
是根据项目支持的最低ios版本确定的,保存好后,删除pod文件夹和Podfile.lock,重新
pod install
一下。
再次运行Flutter项目,我这边就可以正常运行了。