美文网首页
flutter导入三方库报错 pubspec.yaml: A d

flutter导入三方库报错 pubspec.yaml: A d

作者: Faith_K | 来源:发表于2020-03-05 16:20 被阅读0次

    报错信息

    Error on line 30, column 5 of pubspec.yaml: A dependency may only have one source.
    
       ╷
    30 │ ┌     sdk: flutter
    31 │ │     date_format: ^1.0.8
    32 │ │ 
    33 │ │ # For information on the generic Dart part of this file, see the
    34 │ │ # following page: https://dart.dev/tools/pub/pubspec
    35 │ │ 
    36 │ └ # The following section is specific to Flutter.
       ╵
    pub get failed (65;    ╵)
    

    报错主要就是导入的三方库名字没有与flutter_test对齐。有点坑 对齐过后就行了

    dev_dependencies:
      flutter_test:
        sdk: flutter
        date_format: ^1.0.8
    

    改为

    dev_dependencies:
      flutter_test:
        sdk: flutter
      date_format: ^1.0.8
    

    相关文章

      网友评论

          本文标题:flutter导入三方库报错 pubspec.yaml: A d

          本文链接:https://www.haomeiwen.com/subject/gbwfrhtx.html