channdara / flutter_localization

BSD 3-Clause "New" or "Revised" License
10 stars 17 forks source link

Version solving failed with intl_translation ^0.19.0 #14

Closed codelovercc closed 4 months ago

codelovercc commented 4 months ago
% flutter pub get
Resolving dependencies... (1.5s)
Note: meta is pinned to version 1.10.0 by flutter_localizations from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.

Because every version of flutter_localizations from sdk depends on meta 1.10.0 and analyzer >=6.3.0 depends on meta ^1.11.0, flutter_localizations from sdk is incompatible with analyzer >=6.3.0.
And because every version of member_end from path depends on intl_translation ^0.19.0 which depends on analyzer ^6.3.0, flutter_localizations from sdk is incompatible with member_end from path.
So, because member_end_app depends on both flutter_localizations from sdk and member_end from path, version solving failed.
% flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.9, on macOS 12.7.1 21G920 darwin-x64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.85.1)
[✓] Connected device (2 available)
[✓] Network resources

• No issues found!

What should I do? I need both of intl_translation and flutter_localizations.

rafaellop commented 4 months ago

It's not the flutter_localization issue but the flutter_localizations package issue.

Add this to your pubspec.yaml

dependency_overrides:
  intl: 0.19.0
codelovercc commented 4 months ago

Thks,

dependency_overrides:
    meta: ^1.11.0

solves this issue too, I haven't tried your solution yet, but intl_translation ^0.19.0 depends on intl: ^0.18.1