【问题标题】:Flutter App is not running in the iOS platformFlutter App 没有在 iOS 平台上运行
【发布时间】:2020-04-26 20:11:12
【问题描述】:

在我遇到这个问题之后,我已经升级了我的颤振。它在 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

【问题讨论】:

  • 请打开Xcode项目(iOS应用项目),查看Info.plist是否存在。
  • 问题很可能是Info.plist 文件丢失。或者可能是Info.plist 文件的路径已更改。
  • 我怎么知道文件路径已经改变了?因为它在 xcode 中显示相同。 info.plist 文件丢失
  • 您可以从 Xcode 项目转到构建设置。并搜索 info.plist。您将看到该文件的路径。如果路径没有设置,那么你需要设置它
  • 嘿,@Mahendra 请让我知道我在哪里缺少 info.plist 的路径我已经更新了我的问题并在 xcode 中列出了项目结构的一些屏幕截图。

标签: ios xcode flutter dart


【解决方案1】:

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

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

这是你的项目结构。

请查看 Info.plist 文件路径的图片。

希望对你有帮助:)

【讨论】:

  • 你检查过Xcode项目中的Info.plist文件路径吗?
  • 请查看上图 - 如何查看 info.plist 文件路径
猜你喜欢
  • 2019-11-07
  • 2021-06-27
  • 1970-01-01
  • 1970-01-01
  • 2013-10-15
  • 2021-08-31
  • 2021-01-20
  • 2012-01-29
  • 1970-01-01
相关资源
最近更新 更多