报错信息如下:
iOS Command PhaseScriptExecution failed with a nonzero exit code
xxxxx
xxxxx
xxxxx
The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range ...
1.首先 解决了
The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range ...
在项目 ios端目录里面找到 PodFile 文件
然后打开修改里面信息、如果没有post_install do |installer| 这条,请在最后添加这句
如下:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '8.0'
end
end
end
补充 修改或者添加完毕 再检查一下 顶部
ios, '8.0' 需要跟上面设置的一致
'Runner' do 是你工程名字
# platform :ios, '8.0'
# target 'Runner' do
最好再 重新执行 Pod install 命令
Pod install
2.解决 iOS Command PhaseScriptExecution failed with a nonzero exit code
首先 尝试
flutter clean
测试 是否解决
flutter run
如果还是出错
flutter pub cache repair
/*
备注
当 flutter pub cache repair 过程报错时,
就退出终端,
执行flutter clean,
再次执行flutter pub cache repair
*/
最后
flutter clean
网友评论