Flutter项目删除了相关的dart文件之后运行flutter run或者 F5编译运行时会报这个错误.... were declared as an inputs, but did not exi
Posted KIU的博客
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Flutter项目删除了相关的dart文件之后运行flutter run或者 F5编译运行时会报这个错误.... were declared as an inputs, but did not exi相关的知识,希望对你有一定的参考价值。
我所做的项目报的错误是这样的
因为报错内容主要是".... were declared as an inputs, but did not exist. Check the definition of target:kernel_snapshot for errors",应该时删除了文件之后,运行时找不到对应的文件,感觉时缓存问题,没有自动更新到那个文件(kernel_snapshot.d)的内容,导致这个文件里面还会存在之前删除了的文件的路径,这个时候只要运行一下flutter clean清楚一下快照缓存,之后再次执行flutter run就成功了
刚接触Flutter,继续学习吧
以上是关于Flutter项目删除了相关的dart文件之后运行flutter run或者 F5编译运行时会报这个错误.... were declared as an inputs, but did not exi的主要内容,如果未能解决你的问题,请参考以下文章
Dart // Flutter:如何根据条目的内容从列表中删除项目
Waiting for another flutter command to release the startup lock...
Flutter --version 和运行项目时不兼容的 Dart SDK 版本