首页 > 解决方案 > Flutter App 没有在 iOS 平台上运行

问题描述

在我遇到这个问题之后,我已经升级了我的颤振。它在 android 中完美运行,但在 iOS 中它无法正常工作并出现此错误。在这里,我分享了输出。请帮帮我,我花了很多时间来解决这个问题,但找不到任何解决方案。

Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running Xcode build...
Xcode build done.                                            4.5s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
    /Users/alumniassociation02/Documents/my_app/ios/Runner/Info.plist:0: error: reading data: The file “Info.plist” couldn’t be opened because there is no such file.

Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.

这里是Xcode项目结构和Android Studio项目结构——

https://i.stack.imgur.com/lzcWI.png

https://i.stack.imgur.com/50RAv.png

更新了 Xcode 项目目录图片 https://i.stack.imgur.com/Lya26.jpg

标签: iosxcodeflutterdart

解决方案


在看到您的 Xcode 项目的项目结构后,我可以说您的项目中没有正确设置 Info.plist 文件路径。

请查看我的项目的图片(查看Info.plist的位置)

在此处输入图像描述

这是您的项目结构。

在此处输入图像描述

请参阅Info.plist文件路径的打击图像。

在此处输入图像描述

希望对你有帮助:)


推荐阅读