flutter

A dependency may only have one s

2019-06-10  本文已影响0人  开飞机的猫

在flutter项目中添加依赖可能出现如下错误:

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

29 │ ┌ sdk: flutter

30 │ │ english_words: 3.1.0

31 │ │ 

32 │ │ 

33 │ │ # For information on the generic Dart part of this file, see the

34 │ │ # following page: https://www.dartlang.org/tools/pub/pubspec

35 │ │ 

36 │ └ # The following section is specific to Flutter.

pub get failed (65)

这个错误是由于依赖对齐位置没对造成的:

错误示范

改成如下:

正确写法
上一篇 下一篇

猜你喜欢

热点阅读