A dependency specification must be a string or a mapping

时光总嘲笑我的痴心妄想 提交于 2021-02-11 06:31:28

问题


Error on line 32, column 5 of pubspec.yaml: A dependency specification must be a string or a mapping. ╷

32 │ ┌     - assets/
33 │ └ 
   ╵

pub get failed (65; ╵)


回答1:


The problem is I had the assets folder in the wrong location. It should not be under dependencies.

In addition, you must add 2 spaces before "assets", as shown in the picture:



来源:https://stackoverflow.com/questions/61144571/a-dependency-specification-must-be-a-string-or-a-mapping

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!