2
votes

I get this error:

Because my_rents depends on flutter_localizations any from sdk which depends on intl 0.17.0-nullsafety.2, intl 0.17.0-nullsafety.2 is required. So, because my_rents depends on intl ^0.16.0, version solving failed. pub get failed (1; So, because my_rents depends on intl ^0.16.0, version solving failed.)

my_rents is the name of my app, it's not an specific package

If instead of

intl: ^0.16.1

I have

intl: 0.17.0-nullsafety.2

The error I get is

Because firebase_auth >=0.18.0+1 <0.18.1 depends on firebase_auth_web ^0.3.0+1 and firebase_auth >=0.18.1 <=0.18.1+1 depends on firebase_auth_web ^0.3.1, firebase_auth >=0.18.0+1 <=0.18.1+1 requires firebase_auth_web ^0.3.0+1. And because firebase_auth >=0.18.1+2 <0.18.2 depends on firebase_auth_web ^0.3.1+1, firebase_auth

=0.18.0+1 <0.18.2 requires firebase_auth_web ^0.3.0+1. And because firebase_auth >=0.18.2 <0.18.3 depends on firebase_auth_web ^0.3.1+2 and firebase_auth >=0.18.3+1 <0.18.4 depends on firebase_auth_web ^0.3.2+1, firebase_auth >=0.18.0+1 <0.18.3-∞ or >=0.18.3+1 <0.18.4-∞ requires firebase_auth_web ^0.3.0+1. And because firebase_auth =0.18.3 <=0.18.3 depends on firebase_auth_web ^0.3.2 and firebase_auth >=0.18.4 <=0.18.4 depends on firebase_auth_web ^0.3.2+2, firebase_auth >=0.18.0+1 <=0.18.4 requires firebase_auth_web ^0.3.0+1. And because firebase_auth ^0.18.4+1 depends on firebase_auth_web ^0.3.2+3 which depends on intl ^0.16.1, firebase_auth ^0.18.0+1 requires intl ^0.16.1. So, because my_rents depends on both firebase_auth ^0.18.0+1 and intl 0.17.0-nullsafety.2, version solving failed. pub get failed (1; So, because my_rents depends on both firebase_auth ^0.18.0+1 and intl 0.17.0-nullsafety.2, version solving failed.)

2
The easiest way is to remove version specification for the plugins raising conflicts. intl:ASAD HAMEED
without anything you mean? What's the difference from "any"?Dani
I'm not sure if they are different.ASAD HAMEED

2 Answers

1
votes

The dart and flutter teams are transitioning to null-safety feature. It is still in beta (that is why you get this error just with the beta channel). Not every package are already upgraded to null-sefety. You can fix this issue either by:

  • asking the developer of the package to upgrade to null safety
  • use a version of flutter which has not null-safety enabled
  • use a beta version of the package with null-sefty enabled Check also this issue

Original answer: Pubspec.yaml resolving version failed in master channel but works in stable channel in Flutter

For now easiest solution is:

flutter channel stable

flutter upgrade
0
votes

You can resolve the issue by settings the 'any' to resolve issue

https://stackoverflow.com/a/65971167/14950155

Intl: any