Flutter: PhaseScriptExecution failed with a nonzero exit code

  根据这个文档指示https://github.com/flutter/flutter/wiki/Add-Flutter-to-existing-apps在旧项目中使用pod引入Flutter后,使用模拟器调试正常,但build到真机调试后会出现

PhaseScriptExecution failed with a nonzero exit code

  解决方法是把Run Script中的

"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" embed

  注释掉,然后clean一下项目,再build一次

  build到真机后发现一直卡在加载画面,看日志发现是缺少flutter_assets这个文件夹,把它引入到项目中,注意选择Create floder references。再build一下,问题解决

你可能感兴趣的:(Flutter: PhaseScriptExecution failed with a nonzero exit code)