发现问题:
执行 flutter pub run build_runner build 或者 flutter pub run build_runner watch 报如下错误:
Could not find package "build_runner". Did you forget to add a dependency?
pub finished with exit code 65
问题分析:
顾名思义,缺少“ build_runner”package,在pubspec.yaml中添加build_runner的package即可
问题解决:
dependencies:
build_runner: ^1.10.0
重新package get,然后重新执行命令即可。
网友评论