简体   繁体   中英

error occurs during the project of android studio

My pubspec.yaml :

cupertino_icons: "^0.1.2"
          firebase_auth: "^0.15.5+3"
          firebase_core: any
          firebase_database: "^3.1.3"

Here is the error:

/Users/sunny/flutter/bin/flutter --no-color packages get Error detected in pubspec.yaml: Error on line 26, column 7: Expected a key while parsing a block mapping. ╷ 26 │ cupertino_icons: "^0.1.2" │ ^ ╵ Please correct the pubspec.yaml file at /Users/sunny/AndroidStudioProjects/flutter_app1/connect_world/firebase_setup/pubspec.yaml

Process finished with exit code 1: 在此处输入图像描述

pubspec.yaml file require a correct usage of identation (using space and no tabs), see here for more info: https://learn.getgrav.org/16/advanced/yaml#yaml-basic-rules

Edit your file with this:

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: "^0.1.2"
  firebase_auth: "^0.15.5+3"
  firebase_core: any
  firebase_database: "^3.1.3"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM