Because analyzer >=2.0.0 depends on meta ^1.7.0 ... (because myP depends on both flutter_test any from sdk and analyzer 2.0.0, version solving failed)

1k views Asked by At

Is there any other way to resolve this issue other than going on the dev channel (or than using analyzer <2.0.0)? I once made a poor, time consuming experience with the dev channel which is why I would prefer sticking with stable. And I need 2.0.0 for a bug fix of another package.

Because analyzer >=2.0.0 depends on meta ^1.7.0 and every version of flutter_test from sdk depends on meta 1.3.0, analyzer >=2.0.0 is incompatible with flutter_test from sdk. So, because denkschule depends on both flutter_test any from sdk and analyzer 2.0.0, version solving failed. pub get failed (1; So, because myP depends on both flutter_test any from sdk and analyzer 2.0.0, version solving failed.)

1

There are 1 answers

1
jamesdlin On BEST ANSWER

In this case, since version 1.7.0 of package:meta is probably backward compatible with version 1.3.0, I think that it would be safe to add a dependency override to your pubspec.yaml file to force using the newer version:

dependency_overrides:
  meta: ^1.7.0

(package:meta in particular should be safe since that package just provides annotations for static analysis and shouldn't affect runtime behavior.)