小编Sam*_*mel的帖子

致命错误:找不到模块“cloud_firestore”

每次尝试将 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

Run Code Online (Sandbox Code Playgroud)

这是我的 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 …
Run Code Online (Sandbox Code Playgroud)

xcode ios firebase flutter google-cloud-firestore

10
推荐指数
2
解决办法
4866
查看次数

标签 统计

firebase ×1

flutter ×1

google-cloud-firestore ×1

ios ×1

xcode ×1