【问题标题】:I am not able to add dependencies and error after adding englishwords in pubspec.yaml在 pubspec.yaml 中添加英文单词后,我无法添加依赖项和错误
【发布时间】:2022-08-17 22:30:28
【问题描述】:
[flutter_application_1] flutter pub get
Running \"flutter pub get\" in flutter_application_1...           
Error on line 31, column 5 of pubspec.yaml: A dependency may only have one source.
   ╷
31 │ ┌     sdk: flutter
32 │ │     english_words: ^4.0.0
33 │ │ 
34 │ │ 
35 │ │   # The following adds the Cupertino Icons font to your application.
36 │ │   # Use with the CupertinoIcons class for iOS style icons.
37 │ │   cupertino_icons: ^1.0.2
   │ └──^
   ╵
pub get failed (65;    ╵)
exit code 65
  • 你能包括你的 pubspec.yaml 吗?

标签: flutter dart dependencies


【解决方案1】:

有缩进错误,试试这个

dependencies:
  cupertino_icons: ^1.0.2
  flutter:
    sdk: flutter
  
  english_words: ^4.0.0

点表示空格

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-04-28
    • 1970-01-01
    • 2020-01-30
    • 2019-05-17
    • 1970-01-01
    • 2014-08-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多