報錯信息如下:
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
最好再 重新執(zhí)行 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 過程報錯時澡绩,
就退出終端俺附,
執(zhí)行flutter clean,
再次執(zhí)行flutter pub cache repair
*/
最后
flutter clean