After i run this command:
dart run build_runner build
I have below log in terminal:
Bad state: Unable to generate package graph, no `D:\android\<YOUR_APP_NAME>\.dart_tool\flutter_gen\pubspec.yaml` found.
#0 _pubspecForPath (package:build_runner_core/src/package_graph/package_graph.dart:253:5)
#1 _parsePackageDependencies (package:build_runner_core/src/package_graph/package_graph.dart:227:21)
#2 PackageGraph.forPath (package:build_runner_core/src/package_graph/package_graph.dart:105:33)
<asynchronous suspension>
#3 main (file:///C:/Users/001/AppData/Local/Pub/Cache/hosted/pub.dev/build_runner-2.4.6/bin/build_runner.dart:27:30)
<asynchronous suspension>
My flutter version:
Flutter 3.10.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 9cd3d0d9ff (3 months ago) • 2023-05-23 20:57:28 -0700
Engine • revision 90fa3ae28f
Tools • Dart 3.0.2 • DevTools 2.23.1
After some try i got this solution in Build runner issues, But it didn't work for me.
Just delete this path in your project:
D:\android\<NAME_YOUR_APP>\.dart_tool\
After run this command:
dart run build_runner build
Build runner ask you choose some action, Choose 1 option to delete and generate new one.