2

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.

1
  • 1
    Did you solve this issue @Valentine? Commented May 6, 2022 at 6:36

1 Answer 1

2

Try with the --delete-conflicting-outputs flag. You should also do a flutter clean and flutter pub get before trying again.

Sign up to request clarification or add additional context in comments.

2 Comments

Already tried it several times, same output
Thanks, flutter clean and flutter pub get did it for me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.