xcode - 未能找到 "Frameworks/App.framework/flutter_assets"的 Assets 路径

标签 xcode flutter dart

我正在尝试在模拟器( iPhone 8 )上运行我的 flutter 应用程序,但是当应用程序吃午饭时,我得到的只是一个空白的白屏。像这样:

enter image description here

终端输出为:

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/

相关文章:

ios - 获取从当前位置到达某个地方的时间

dart - Flutter 如何发布 json 数组

android - 获取完整的 html div 文本

dom - 如何在Dart 2.0中访问object元素的contentDocument?

iOS,CoreLocation - 在应用加载时获取用户位置

ios - 从 UIButton 持续发送消息

ios - 续订iOS发布配置文件

flutter - 列出 VS Code 中的参数

image - 如何在 flutter web 程序中压缩图像

dart - 在 Dart 中实现观察者模式