【发布时间】:2021-05-19 11:36:24
【问题描述】:
我目前正在尝试使用 xcode 来使用 xcode 测试我的颤振应用程序。最大的问题是我的所有导入(例如 app_settings、cloud_firestore 等)都给出了“未找到模块 ___”的错误。当我尝试运行我的飞镖代码时,我在终端中收到错误:
[Proj Root]/ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error: module 'app_settings' not found
@import app_settings;
~~~~~~~~^~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
我尝试为 ios 运行 flutter create,(这可能会让事情变得更糟?) Flutter clean 和重新安装 pod 似乎也不起作用。我想知道导入模块是否有一些简单的东西我错过了。我使用应该适用于 Android 和 iOS 的模块在 android 上创建了应用程序。在使 android 版本正常工作后,我通过 github 将我的项目拉到了我的 mac 上,最后解决了这个问题。任何指针将不胜感激,因为我完全坚持这一点。
【问题讨论】:
-
您找到解决方案了吗?这适用于我的 iPhone,但不适用于模拟器
-
是的,我的解决方案是删除 Pods 文件并执行 Flutter run -> flutter pub get。希望这会有所帮助