ios - Flutter 无法在 ios 模块上构建 'cloud_firestore' not found @import cloud_firestore;
问题描述
我正在使用 codemagic 部署到我在 App Store 上的应用程序。Android 构建很好,但是当它为 IOS 构建时,我收到此错误:
/Users/builder/clone/ios/Runner/GeneratedPluginRegistrant.m:12:9: fatal error: module 'cloud_firestore' not found
@import cloud_firestore;
这是我的 Podfile。
# Uncomment the next line to define a global platform for your project
platform :ios, ’10.0’
target 'Runner' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for Runner
end
我做了 pod install 和更新,但我不能,flutter build ios
因为我在 Windows 上。我怎样才能解决这个问题?
解决方案
我多次遇到这个问题,这是我修复它的过程:
- 升级 Firebase 发布包
- 记得同时添加 Firebase Core 包
- 请记住将 Runner 添加到您使用
GoogleService-Info.plist
的 Runner 文件夹中,因为它需要链接。ios/Runner.xcworkspace
Xcode
- 使用终端
flutter clean
flutter pub get
cd ios
pod cache clean --all
pod install
pod update
然后尝试再次运行该项目或再次构建它。
推荐阅读
- java - 在 java.lang.ref.Finalizer 上设置的 Java 断点未停止
- java - swgger ui object参数中的MultipartFile类型无法识别
- c++ - C++'没有重载函数的实例'为什么我会收到这个错误?
- python - 处理 Keyerror 并在 pymongo 和 html 中显示结果
- telegram-bot - Python Telegram Bot ConversationHandler 无法与 webhook 一起使用
- python - Python TelegramBot deletewebhook
- python - 如何获得深度学习模型的平均绝对误差 (MAE)
- excel - 应用序列号 IF ISBLANK 的宏
- html - HTML/CSS 导航栏着色
- c - 自引用结构声明