iOS混编flutter中run script脚本配置一个浅坑

在添加Run Script的"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" build的这句话后,反而编译报错,在主工程的同级目录下新建了一个.dart_too的文件夹,报的错是

/主工程所在的路径/.dart_tool/package_config.json does not exist.
Did you run this command from the same directory as your pubspec.yaml file?
Command PhaseScriptExecution failed with a nonzero exit code

解:在build settings里添加FLUTTER_APPLICATION_PATH。。。

有时候vscode里没保存还会报
Command PhaseScriptExecution failed with a nonzero exit code
保存再build即可

有时候误自动引入import 'dart:js';也会build失败

你可能感兴趣的:(iOS混编flutter中run script脚本配置一个浅坑)