The iOS Simulator deployment target ‘IPHONEOS_DEPLOYMENT_TARGET‘ is set to 8.0, but the range...

今天好信儿把xcode升级到最新版本,然后运行之前的flutter项目报了这个错

解决办法:在ios中podfile文件最后添加如下代码

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
    end
  end
end

修改的版本号与报错中提示的一致即可

你可能感兴趣的:(ios,Flutter)