Reputation: 431
Because every version of flutter_localizations
from SDK depends on intl 0.17.0
and fstore depends on intl ^0.16.1
, flutter_localizations from SDK is forbidden.
So, because fstore depends on flutter_localizations any from SDK, version solving failed. pub get failed (1; So, because fstore depends on flutter_localizations any from sdk, version solving failed.)
Upvotes: 43
Views: 107242
Reputation: 2501
You can try running the command
flutter pub upgrade --major-versions
It fixed the issue for me
Upvotes: 0
Reputation: 59
Because every version of flutter_sheet_localization_generator from git depends on intl ^0.17.0 and every version of flutter_localizations from sdk depends on intl 0.18.1, flutter_sheet_localization_generator from git is incompatible with flutter_localizations from sdk.
Upvotes: -1
Reputation: 4418
Update Flutter to new version to compatible with new intl
package.
Upvotes: 0
Reputation: 612
This solved it. Edit your pubspec.yaml as below
dependencies:
flutter:
sdk: flutter
...
...
# Add localization as below
flutter_localizations:
sdk: flutter
intl: any
Upvotes: 5
Reputation: 191
Just override the dependency
dependency_overrides:
intl: 0.17.0
Upvotes: 3
Reputation: 834
I had the same issue, I had to use ***
dependency_overrides
*** and resolve the issue
dependency_overrides:
intl: any
Upvotes: 38
Reputation: 1185
Did you try to force package update with
flutter update-packages --force-upgrade
I had the same issue and after updating packages I was able to install flutter_localizations.
Solution found on this github issue https://github.com/flutter/flutter/issues/117163
Upvotes: 15
Reputation: 569
In my case, I used flutter 1 and the dependency version belongs to flutter 2.
Use the Not Null safety versions.
Upvotes: 0
Reputation: 179
You can check this link it helped me a lot
https://medium.com/swlh/convert-your-flutter-app-to-enjoy-null-safety-69632aa62d7a
Although it was claimed that null safety is an opt-in feature, a fresh install still somehow forced me to upgrade my dependency. Anyway, I was glad that the error message was very useful and the change seemed easy. So, I replaced the line:
intl: ^0.16.1
with
intl: ^0.17.0-nullsafety.2
Now my % flutter pub get was clean and the app worked fine without any changes. That’s great! For any kind of migration exercise, it is always a good idea to start with a working baseline.
Upvotes: 6