'Flutter build not generating files

I am new to Flutter and tried setting up an application but the last step is always failing:

flutter packages pub run build_runner build

I get the following error:

enter image description here

My pubspec.yaml file contains these dependencies:

name: flutter__app
description: A new Flutter application.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 1.0.0+1

environment:
  sdk: ">=2.10.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  cupertino_icons: ^1.0.0
  built_value: ^7.1.0
  built_collection: ^4.3.2
  dio: ^3.0.10
  intl: ^0.17.0-nullsafety.2
  get: ^3.17.1
  flutter_localizations:
    sdk: flutter
  async: ^2.4.2
  get_storage: ^1.3.2

dev_dependencies:
  flutter_test:
    sdk: flutter
  build_runner: ^1.0.0
  built_value_generator: ^7.1.0

flutter:
  generate: true
  uses-material-design: true

#see https://github.com/google/built_value.dart/issues/923
dependency_overrides:
  analyzer: 0.41.1

The build files are not generating correctly and I get tons of erros. I tried to solve it changing the versions of: build_runner, built_value_generator, analyzer without success.

I also tried deleting the cache in the \Local\Pub\Cache directory because I thought the cache might be corrupted.

Any input is appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source