在文章https://github.com/flutter/flutter/wiki/Obfuscating-Dart-Code,它说Add the following flag to the build aot call in the <ProjectRoot>/packages/flutter_tools/bin/xcode_backend.sh file
。
但我根本没有目录<ProjectRoot>/packages/
。我必须以某种方式创建它吗?非常感谢。
我猜官方文档上有错误。
更新:维基页面现在已经是corrected
不是
<ProjectRoot>/packages/flutter_tools/bin/xcode_backend.sh
但应该是(而且是)
<FlutterRoot>/packages/flutter_tools/bin/xcode_backend.sh
如果您不记得安装了flutter sdk的位置,请尝试以下命令:
which flutter
它会显示出来
<FlutterRoot>/bin/flutter
然后你会在<FlutterRoot>
看到你的文件
cd <FlutterRoot>
find . -name "xcode_backend.sh"
./packages/flutter_tools/bin/xcode_backend.sh
至少官方文档指出这个功能是
并指出这个有用的qazxsw poi。
我有同样的问题,我可以通过在用户定义的设置中添加Flutter SDK路径来解决这个问题。打开项目目标并使用键名称FLUTTER_ROOT添加用户定义的设置以及flutter SDK位置的值。下图供进一步参考。