aissat / easy_localization

Easy and Fast internationalizing your Flutter Apps
https://pub.dev/packages/easy_localization
MIT License
920 stars 329 forks source link

[Dependency Error] path 1.8.1 and easy_localization 3.0.0 depends #445

Open JAICHANGPARK opened 2 years ago

JAICHANGPARK commented 2 years ago
Because every version of flutter_test from sdk depends on path 1.8.1 and easy_localization 3.0.0 depends on path >=1.8.0-nullsafety <=1.8.0, flutter_test from sdk is incompatible with easy_localization 3.0.0.
And because no versions of easy_localization match >3.0.0 <4.0.0, flutter_test from sdk is incompatible with easy_localization ^3.0.0.
albert0m commented 2 years ago

yeah I just upgraded to flutter latest version (on master) and it gives me this error. Could you please update the version of path?

novembrea commented 2 years ago

The same problem, I'm on a Flutter master channel.

Joldersman commented 2 years ago

The same problem :( The fast solution now is to downgrade Flutter to the previous version. Run in terminal: flutter downgrade // for me Downgrade flutter to version 2.9.0-0.0.pre-299-g098721e341 // ? [y|n]: y )

then run flutter --version

I hope author of plugin will release an update soon.

luomo-pro commented 2 years ago

Also encountered the same problem with the latest master channel

luomo-pro commented 2 years ago

@Joldersman I can't solve this problem after downgrading on master channel, do you have any other way to solve this problem? Thank you very much!

artemsivcev commented 2 years ago

Other quick fix - open folder with easy_localization, find pubspec.yaml, and change this path: '>=1.8.0-0 <=1.8.0' to this path: '>=1.8.0-0 <=2.0.0'

Joldersman commented 2 years ago

Other quick fix - open folder with easy_localization, find pubspec.yaml, and change this path: '>=1.8.0-0 <=1.8.0' to this path: '>=1.8.0-0 <=2.0.0'

I just to expand on your answer a bit as it can be hard for juniors to find where to change path: '>=1.8.0-0 <=2.0.0'

So: pubspec.yaml which we need is located in the folder .../flutter/.pub-cache/hosted/pub.dartlang.org/easy_localization-3.0.0/

Go to your flutter/ then There may be a problem - you won't see the hidden folder /.pub-cache/

to enable hidden folders on Mac: in Finder press (cmd +shift+ dot (.) ) on Windows: Open File Explorer from the taskbar. Select View > Options > Change folder and search options. Select the View tab and, in Advanced settings, select Show hidden files, folders, and drives and OK.

Then follow the advice from @artemsivcev

phongbm commented 2 years ago

I'm facing a same problem. I found the solution which can resolve it. Use easy_localization: ^3.0.0-nullsafety.0 instead of easy_localization: ^3.0.0 Is this a good solution?

phongbm commented 2 years ago

I use easy_localization: ^3.0.0-nullsafety.0 When running, app show error: type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast

How to fix it?

aissat commented 2 years ago

Hi guys, please check easy_localization 3.0.1-dev

tschiekdev commented 2 years ago

No, 3.0.1-dev did not work!

path 1.8.1 is still not supported!

Because no versions of easy_localization match >3.0.1-dev <4.0.0 and easy_localization 3.0.1-dev depends on flutter_localizations from sdk, easy_localization ^3.0.1-dev requires flutter_localizations from sdk. And because every version of flutter_localizations from sdk depends on path 1.8.0, easy_localization ^3.0.1-dev requires path 1.8.0. So, because ultrapass depends on both easy_localization ^3.0.1-dev and path ^1.8.1, version solving failed. pub get failed (1; So, because ultrapass depends on both easy_localization ^3.0.1-dev and path ^1.8.1, version solving failed.)

Yegair commented 2 years ago

Just ran into this issue after upgrading to Flutter 3. What worked for me was either using easy_localization: 3.0.1-dev or adding dependency_overrides to pubspec.yaml:

dependency_overrides:
  path: 1.8.1

I am not feeling very comfortable releasing an app containing either of those workarounds. However, I have no clue if there are any real drawbacks to one of the two solutions.