【问题标题】:how do I solve this dependency packages error?如何解决此依赖包错误?
【发布时间】:2021-09-15 06:23:55
【问题描述】:

Error on line 31, column 5 of pubspec.yaml: A dependency may only have one source.
   ╷
31 │ ┌     sdk: flutter
32 │ │     firebase_core: "0.4.4"
33 │ │     firebase_analytics: "5.0.11"
34 │ │     firebase_auth: "0.15.4"
35 │ │     firebase_storage: "3.1.1"
36 │ │     cloud_firestore: "0.13.2+1"
37 │ │     provider: "4.0.4"
38 │ │     image_picker: "0.6.3+4"
39 │ │     timeago: "2.0.26"
40 │ │     flutter_spinkit: "4.1.2"
41 │ │ 
42 │ │ 
43 │ │   # The following adds the Cupertino Icons font to your application.
44 │ │   # Use with the CupertinoIcons class for iOS style icons.
45 │ │   cupertino_icons: ^1.0.2
   │ └──^
   ╵
Running "flutter pub get" in letstalk...
pub get failed (65;    ╵)

【问题讨论】:

标签: android flutter


【解决方案1】:

你应该在 sdk 后面添加两个空格的依赖项:flutter

这样

dependencies:
  flutter:
    sdk: flutter
  cupertino_icons: ^1.0.3
  firebase_core: ^1.0.2
  firebase_auth: ^1.0.2

【讨论】:

    猜你喜欢
    • 2022-09-22
    • 2021-05-03
    • 2013-04-29
    • 2012-01-19
    • 1970-01-01
    • 2021-05-23
    • 2020-07-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多