我尝试过flutter清理,但错误没有出现。我使用了Moor 4.6.1版本,之后出现了错误
C:UsersLENOVOdevelopmentprojectsToDo_App>flutter packages run build_runner build
[SEVERE] drift_dev:drift_dev on lib/custom_widget/tasks_tile.dart (cached):
InconsistentAnalysisException: Requested result might be inconsistent with previously ret
urned results
[SEVERE] drift_dev:drift_dev on lib/modals/task.dart (cached):
InconsistentAnalysisException: Requested result might be inconsistent with previously ret
urned results
[SEVERE] drift_dev:drift_dev on lib/custom_widget/tasks_list.dart (cached):
InconsistentAnalysisException: Requested result might be inconsistent with previously ret
urned results
[SEVERE] Failed after 11.5s
pub finished with exit code 1
有两件事要做:首先:将build_runner版本降级为2.1.6或2.1.5
dev_dependencies:
build_runner: 2.1.6
第二:也降级分析仪版本
dependency_overrides:
analyzer: 3.3.1