Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

package incompatible version after upgrading flutter

My Flutter app depends on intl_utils: ^1.6.3, and today I upgraded Fluter to the latest Flutter (Channel master, 1.26.0-2.0.pre.86, on Mac OS X 10.15.4 19E287 darwin-x64, locale en-US).

Now when I run pub get I get this error:

Because every version of flutter_localizations from sdk depends on intl 0.17.0-nullsafety.2 and intl_translation >=0.17.7 depends on intl >=0.15.3 <0.17.0, flutter_localizations from sdk is incompatible with intl_translation >=0.17.7.

Because intl_utils >=1.6.3 <1.9.0 depends on intl_translation 0.17.10 and intl_utils >=1.9.0 depends on intl_translation 0.17.10+1, intl_utils >=1.6.3 requires intl_translation 0.17.10 or 0.17.10+1.
Thus, flutter_localizations from sdk is incompatible with intl_utils >=1.6.3.
So, because xxx depends on both flutter_localizations any from sdk and intl_utils ^1.6.3, version solving failed.
pub get failed (1; So, because xxx depends on both flutter_localizations any from sdk and intl_utils ^1.6.3, version solving failed.)

so I added intl: ^0.17.0-nullsafety.2 and intl_translation: ^0.17.10+1 but now I get this

Because intl_translation >=0.17.7 depends on intl >=0.15.3 <0.17.0 and xxx depends on intl ^0.17.0-nullsafety.2, intl_translation >=0.17.7 is forbidden.
So, because xxx depends on intl_translation ^0.17.10+1, version solving failed.
pub get failed (1; So, because xxx depends on intl_translation ^0.17.10+1, version solving failed.)

I then changed to intl_translation: 0.17.6 and now the error is:

Because intl_translation >=0.17.0 <0.17.7 depends on intl ^0.15.3 and xxx depends on intl ^0.17.0-nullsafety.2, intl_translation >=0.17.0 <0.17.7 is forbidden.

So, because gipi_partner depends on intl_translation 0.17.6, version solving failed.

pub get failed (1; So, because xxx depends on intl_translation 0.17.6, version solving failed.)

I'm trying all combinations of versions but none is working. Should I just downgrade Flutter?

like image 372
Vincenzo Avatar asked Dec 19 '20 11:12

Vincenzo


2 Answers

a temporary workaround you can override the dependency in pubspec.yaml

dependency_overrides:
  intl: 0.17.0
like image 118
Ali Kamal Avatar answered Sep 28 '22 04:09

Ali Kamal


it's best you downgrade there are compatibility issue with the newer version.

like image 32
Waleed J. Avatar answered Sep 28 '22 04:09

Waleed J.