How to Solve Pub Run build_runner build Failed In Flutter ?
When the user creates a flutter project and runs a flutter command flutter pub get sometimes he may get an error that says “How to Solve Pub Run build_runner build Failed In Flutter ?”
How to Solve Pub Run build_runner build Failed In Flutter?
To Solve this error user can give try to below method:
flutter pub get && flutter pub run build_runner build --delete-conflicting-outputs
add a dependency in pubsec.yaml, analyzer: ‘0.39.14‘. Add Dependencies like the below:
flutter clean flutter pub cache repair flutter pub run build_runner clean
flutter pub run build_runner build
Users can give try to below method.
Successfully generating all *.g.dart files with:
It seems to break build_runner or json_serializable in version:
Going back to the dart analyzer version:
This error is basically caused by the auto formatter removing the line like below.
In this article, We have a walkthrough How to Solve Pub Run build_runner build Failed In Flutter?
Thanks for Reading !!!
Keep Learning !!! Keep Fluttering !!!
FlutterAgency.com is our portal Platform dedicated to Flutter Technology and Flutter Developers. The portal is full of cool resources from Flutter like Flutter Widget Guide, Flutter Projects, Code libs and etc.
FlutterAgency.com is one of the most popular online portal dedicated to Flutter Technology and daily thousands of unique visitors come to this portal to enhance their knowledge on Flutter.