我正在尝试在模拟器( iPhone 8 )上运行我的 flutter 应用程序,但是当应用程序吃午饭时,我得到的只是一个空白的白屏。像这样:
终端输出为:
Running pod install... 40.0s
Running Xcode build...
├─Assembling Flutter resources... 20.4s
└─Compiling, linking and signing... 57.0s
Xcode build done. 288.8s
path: satisfied (Path is satisfied), interface: en1
Failed to find assets path for "Frameworks/App.framework/flutter_assets"
Configuring the default Firebase app...
path: satisfied (Path is satisfied), interface: en1
path: satisfied (Path is satisfied), interface: en1
Configured the default Firebase app __FIRAPP_DEFAULT.
[VERBOSE-2:engine.cc(127)] Engine run configuration was invalid.
[VERBOSE-2:shell.cc(437)] Could not launch engine with configuration.
https://firebase.google.com/docs/cloud-messaging/ios/client#method_swizzling_in_firebase_messaging
to ensure proper integration.
Syncing files to device iPhone 8...
10,195ms (!)
我正在使用 flutter 的稳定版本
1.12.13+hotfix.9
,并且此问题仅出现在 ios 构建中。我该如何解决这个问题?
最佳答案
我刚刚设法解决了这个问题。我刚刚遵循了建议 https://github.com/flutter/flutter/issues/29974并添加
“$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh”嵌入
运行脚本
Run script
重建后 App.framework 文件夹已添加到 build 目录,问题消失了。
希望这会帮助别人。
关于xcode - 未能找到 "Frameworks/App.framework/flutter_assets"的 Assets 路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61144408/