7

Good morning, I have a problem with the flutter app am using vscode, and after resolving the configuration's problems I have this problem and I couldn't solve it can you please help me with this?

when I run "flutter pub get" it shows me this message:

Because every version of flutter_test from SDK depends on meta 1.3.0 and active_ecommerce_flutter depends on meta ^1.4.0, flutter_test from SDK is forbidden. So, because active_ecommerce_flutter depends on flutter_test any from SDK, version solving failed. Running "flutter pub get" in ACT... pub get failed (1; So, because active_ecommerce_flutter depends on flutter_test any from SDK, version solving failed.)

thank you for your collaboration.

JideGuru
  • 7,102
  • 6
  • 26
  • 48
Lynda
  • 71
  • 1
  • 3
  • Can you edit your question with your pubspec.yaml? It is related to some dependency issues. – Akif Jul 29 '21 at 09:01

3 Answers3

9

This problem is because your flutter version is using meta 1.3.0and your active_ecommerce_flutter is using meta 1.4.0 causing a conflict.

Solution 1:

Upgrade your flutter version by typing flutter upgrade in the terminal.

However, at the point of time of writing this answer, the latest stable version of flutter is still using meta 1.3.0. Thus, you will need to upgrade from a different channel than "stable", like (beta, dev, or master).

example:

 flutter channel dev
 flutter upgrade

Solution 2:

Try downgrading your active_ecommerce_flutter step by step till reaching a compatible version.

Solution 3: (Recommended)

Just add this line in your pubspec.yaml file:

dependency_overrides:
  meta: ^1.3.0

This will force using meta: ^1.3.0

Mena
  • 3,019
  • 1
  • 25
  • 54
  • 1
    Thank you so much for this, I thought I was crazy, or my app was broken, I spent ages on this. FYI - Stable release 2.5.0 now uses meta 1.7.0 – cVer Sep 10 '21 at 05:42
0

I think This is an SDK issue which you are using,

Upgrade your SDK from the following command:

flutter upgrade --force

OR

flutter upgrade

after upgrading SDK run flutter pub get

I hope this will fix your problem, Happy Fluttering.

Tushar Patel
  • 500
  • 3
  • 10
  • [https://stackoverflow.com/a/59788677/16252358] you should follow this link hope you get your answers and maybe you are probably using another directory to perform flutter pub get, check your directory path – Tushar Patel Jul 29 '21 at 10:56
0

I had this problem yesterday another package. I solved downgrade package version of troubled package. So you can try downgrade active_ecommerce_flutter