【发布时间】:2021-01-08 22:12:58
【问题描述】:
我每次尝试将 Cloud Firestore 添加到我的 Flutter 项目时都会收到此错误。我首先在我的主要项目中尝试了它,但它失败了。我在一个干净的新项目上尝试了它,每次都得到相同的结果。我已经阅读了至少 10 篇不同的帖子,其中有人遇到了这个错误。它都没有奏效。我尝试删除 Pods 和 Podfile/Podfile.lock 并生成新的。我尝试使用最新的依赖项“cloud_firestore: ^0.14.0”。
这是我的 pubspec.yaml:
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
cloud_firestore: ^0.14.0
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.3
dev_dependencies:
flutter_test:
sdk: flutter
这是我的 Podfile(它的一部分):
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Runner' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for Runner
end
# add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'
# add pods for any other desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods
pod 'Firebase/Firestore'
我越来越痛苦了,因为我花了两天时间观看 YouTube 视频,查看了我可以查看的任何文章,但我不骗你,没有任何效果。我什至联系了 Firebase 支持以获得一些答案,但我还没有得到任何回复。
如果你碰巧知道我该如何解决这个问题,我将非常感激!
【问题讨论】:
标签: ios xcode firebase flutter google-cloud-firestore