在使用Flutter的时候添加依赖报错了
flutter引入外部包出错 A dependency may only have one source.

Error on line 34, column 5 of pubspec.yaml: A dependency may only have one source.

34 │ ┌ sdk: flutter
35 │ │
36 │ │ cupertino_icons: ^0.1.0
37 │ │ english_words: ^3.1.0
38 │ │ # For information on the generic Dart part of this file, see the
39 │ │ # following page: https://dart.dev/tools/pub/pubspec
40 │ │
41 │ └ # The following section is specific to Flutte.

pub get failed (65; ╵)
flutter引入外部包出错 A dependency may only have one source.

之后发现放错了位置
flutter引入外部包出错 A dependency may only have one source.

在pub get 成功
flutter引入外部包出错 A dependency may only have one source.

还有一种可能 明明没有犯错但还是报错,起先以为是符号错误了,可是反复尝试都没有
flutter引入外部包出错 A dependency may only have one source.
最后 发现引入的时候必须对齐才可以编译成功,sdk注意一定要缩进一格

flutter引入外部包出错 A dependency may only have one source.

相关文章:

  • 2021-12-20
  • 2021-06-03
  • 2021-11-07
  • 2022-12-23
  • 2021-07-23
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-03
  • 2021-10-22
  • 2021-07-01
  • 2021-07-09
  • 2021-06-03
  • 2021-12-21
相关资源
相似解决方案