Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update json_annotation dependency #93

Closed
EmanueleVinci opened this issue Mar 8, 2021 · 5 comments
Closed

update json_annotation dependency #93

EmanueleVinci opened this issue Mar 8, 2021 · 5 comments

Comments

@EmanueleVinci
Copy link

When I run "pub get" appears this error

Because flutter_gen >=2.0.1 <2.0.2 depends on flutter_gen_core ^2.0.1 and flutter_gen >=2.0.2 depends on flutter_gen_core ^2.0.2, flutter_gen >=2.0.1 requires flutter_gen_core ^2.0.1.
And because flutter_gen_core >=2.0.1-dev.0 depends on json_annotation ^3.1.0, flutter_gen >=2.0.1 requires json_annotation ^3.1.0.
So, because your_project depends on both json_annotation ^4.0.0 and flutter_gen ^2.0.1, version solving failed.

Can you please update the dependency?

@wasabeef
Copy link
Member

wasabeef commented Mar 8, 2021

@EmanueleVinci
Thanks for using FlutterGen.
Which one are you using flutter_gen version? We released flutter_gen 2.0.2.

dart

dart pub global activate flutter_gen

brew

brew upgrade fluttergen/tap/fluttergen

build_runner

dev_dependencies:
  build_runner:
  flutter_gen_runner: ^2.0.2

@EmanueleVinci
Copy link
Author

I was using 2.0.1, but with 2.0.2 I've the same problem.

pubspec.yaml

dependencies:
  flutter:
    sdk: flutter

  #Firebase
  firebase_core: ^1.0.0
  cloud_firestore: ^1.0.0
  firebase_auth: ^1.0.0
  cloud_functions: ^1.0.0
  firebase_storage: ^8.0.0
  google_sign_in: ^5.0.0
  firebase_messaging: ^9.0.0

  #Logic
  flutter_bloc: ^6.1.3

  #Utility
  cupertino_icons: ^1.0.2
  google_fonts: ^2.0.0
  json_annotation: ^4.0.0
  flutter_gen: ^2.0.2
  shared_preferences: ^2.0.3
  intl: ^0.17.0
  url_launcher: ^6.0.2
  image_picker: ^0.7.2


dev_dependencies:
  flutter_test:
    sdk: flutter

  build_runner: ^1.11.5
  json_serializable: ^4.0.2
  flutter_gen_runner: ^2.0.2

The error is always the same:

Because flutter_gen >=2.0.2 depends on flutter_gen_core ^2.0.2 which depends on json_annotation ^3.1.0, flutter_gen >=2.0.2 requires json_annotation ^3.1.0.
So, because base_project depends on both json_annotation ^4.0.0 and flutter_gen ^2.0.2, version solving failed.
pub get failed (1; So, because base_project depends on both json_annotation ^4.0.0 and flutter_gen ^2.0.2, version solving failed.)

Am I doing something wrong?

@wasabeef
Copy link
Member

@EmanueleVinci
I understood the issue, but we have to release a null safety version to solve it.
So could you wait for the null safety version 3.0.0 maybe we will release it in a few days.

@EmanueleVinci
Copy link
Author

ok, thank you!

@wasabeef
Copy link
Member

@EmanueleVinci
I'm sorry for late reply.

Just now we released v3.0.2 null safety so could you try it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants