pubspec.yaml:添加cloud_firestore时在解析块映射时需要键

时间:2018-08-29 10:19:45

标签: firebase dart flutter google-cloud-firestore

在将cloud_firestore添加到项目的依存关系并按下程序包时,弹出或升级此错误消息

  

在alaganbyasta中运行“ flutter软件包获取” ...   pubspec.yaml的第7行第5列错误:解析> block映射时需要键。      cloud_firestore:^ 0.7.4      ^   酒馆失败(65)   流程结束,退出代码为65

我尝试自行升级Flutter,但之前我修改了date_picker.dart,因此他要求我在升级前提交

我的pubspec.yaml是

name: alaganbyasta
description: A new Flutter application.
dependencies:
  flutter:
      sdk: flutter
    cloud_firestore: v0.7.4
  cupertino_icons: ^0.1.2
dev_dependencies:
  flutter_test:
    sdk: flutter
flutter:
  uses-material-design: true

1 个答案:

答案 0 :(得分:1)

更改

dependencies:
  flutter:
      sdk: flutter
    cloud_firestore: v0.7.4
  cupertino_icons: ^0.1.2

dependencies:
  flutter:
    sdk: flutter
  cloud_firestore: v0.7.4
  cupertino_icons: ^0.1.2