依赖关系规范必须是字符串或映射 [英] A dependency specification must be a string or a mapping

查看:56
本文介绍了依赖关系规范必须是字符串或映射的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

第32行pubspec.yaml的第5列错误:依赖关系规范必须是字符串或映射.╷

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

32 │ ┌     - assets/
33 │ └ 
   ╵

发布失败(65;╵)

推荐答案

问题是我的资产文件夹位置错误.它不应该依赖.

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

此外,您必须在资产"之前添加2个空格,如图所示:

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

这篇关于依赖关系规范必须是字符串或映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆