Flutter:xcode_backend.sh在哪里?

798qvoo8  于 2023-05-23  发布在  Flutter
关注(0)|答案(2)|浏览(192)

在doc 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/目录。我必须以某种方式创造它吗?

ct2axkht

ct2axkht1#

我遇到了同样的问题,我能够通过在用户定义的设置中添加Flutter SDK路径来解决这个问题。打开Project Target并添加User-Defined Setting,其键名为FLUTTER_ROOT以及flutter SDK位置的值。下图以供进一步参考。

nnvyjq4y

nnvyjq4y2#

我想官方文件上有个错误。

更新:wiki页面现已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

至少官方文档指出,这个功能是

然后指向这个有用的SO answer

相关问题