Package version incompatibilities - flutter

Because firebase_ui_auth >=1.0.3 depends on firebase_core ^2.1.1 and cloud_firestore >=3.1.2 <4.0.1 depends on firebase_core ^1.10.2, firebase_ui_auth >=1.0.3 is incompatible with cloud_firestore >=3.1.2 <4.0.1.
So, because "my_project" depends on both cloud_firestore ^3.4.2 and firebase_ui_auth ^1.0.3, version solving failed.
pub get failed (1; So, because "my_project" depends on both cloud_firestore ^3.4.2 and firebase_ui_auth ^1.0.3, version solving failed.)
exit code 1
How can I fix this?

Try
firebase_ui_auth: ^1.0.0-dev.0 # or ^1.0.3
firebase_core: ^1.24.0
cloud_firestore: ^3.4.9

Related

Which verson of firebase auth lib requires plugin interface of 1.0.2?

Running "flutter pub get" in textrecognizer...
Because firebase_auth >=4.2.8 depends on firebase_auth_platform_interface ^6.11.10 which depends on plugin_platform_interface ^2.1.3, firebase_auth >=4.2.8 requires plugin_platform_interface ^2.1.3.
And because image_picker >=0.6.7 <0.7.0-nullsafety depends on image_picker_platform_interface ^1.1.0 which depends on plugin_platform_interface ^1.0.2, firebase_auth >=4.2.8 is incompatible with image_picker >=0.6.7 <0.7.0-nullsafety.
So, because textrecognizer depends on both image_picker ^0.6.7+6 and firebase_auth ^4.2.8, version solving failed.
pub get failed (1; So, because textrecognizer depends on both image_picker ^0.6.7+6 and firebase_auth ^4.2.8, version solving failed.)
I need the 0.6.7+6 version of image_picker library so I cannot change that. Maybe any suggestions to change firebase_auth version to make it compatible with the version of image_picker?
I tried minimizing the version of firebase_Auth and it still didn't work

depends on both floor_generator ^1.2.0 and retrofit_generator ^4.0.1, version solving failed

I am using retrofit_generator and floor_generator in my application.
retrofit_generator: ^4.0.1
floor_generator: ^1.2.0
When I am trying to run flutter packages pub run build_runner build getting this error:
Because no versions of retrofit_generator match >4.0.1 <5.0.0 and retrofit_generator 4.0.1 depends on analyzer ^3.0.0, re
trofit_generator ^4.0.1 requires analyzer ^3.0.0.
And because floor_generator >=1.2.0 depends on analyzer ^2.2.0, retrofit_generator ^4.0.1 is incompatible with floor_gene
rator >=1.2.0.
So, because my_flutter_app depends on both floor_generator ^1.2.0 and retrofit_generator ^4.0.1, version solving failed.
Running "flutter pub get" in my_flutter_app...
pub get failed (1; So, because my_flutter_app depends on both floor_generator ^1.2.0 and retrofit_generator ^4.0.1,
version solving failed.)
Also, tried to add analyzer: ^3.0.0 in dev_dependencies then:
Because floor_generator >=1.2.0 depends on analyzer ^2.2.0 and my_flutter_app depends on analyzer ^3.0.0, floor_generator >=1.2.0 is forbidden.
So, because my_flutter_app depends on floor_generator ^1.2.0, version solving failed.
pub get failed (1; So, because my_flutter_app depends on floor_generator ^1.2.0, version solving failed.)
exit code 1
How can we use both without errors?
Checking the retrofit_generator CHANGELOG, you will see there was a breaking change on version 4.0.0 making the library depend on version 3.0.0 but floor_generator hasn't been updated for the last 7 months and it depends on older version of analyzer.
Possible solution would be to downgrade retrofit_generator in a version prior to the breaking change, or wait till the publisher of floor_generator updates its dependencies.
They said on there github on issue:
It looks like the current master already supports analyzer <5.0.0 but
it's not on pub.dev yet because of a failed test because the pub
command can't be found.
check this link the issue
so thanks for this at least now we can use the git url until you publish it on pub.dev .
use:
retrofit_generator:
git:
url: https://github.com/trevorwang/retrofit.dart.git/
ref: master
path: generator
instead of
retrofit_generator: ^4.0.1

flutter:: [ERROR] So, because 'filename' depends on both shared_preferences ^2.0.9 and flutter_audio_recorder 0.5.5, version solving failed

Because every version of flutter_audio_recorder depends on file ^5.0.4 and shared_preferences_windows >=2.0.0 depends on file ^6.0.0, flutter_audio_recorder is incompatible with shared_preferences_windows >=2.0.0.
And because shared_preferences 2.0.9 depends on shared_preferences_windows ^2.0.0 and no versions of shared_preferences match >2.0.9 <3.0.0, flutter_audio_recorder is incompatible with shared_preferences ^2.0.9.
So, because mirinae_gugu depends on both shared_preferences ^2.0.9 and flutter_audio_recorder 0.5.5, version solving failed.
pub get failed (1; So, because mirinae_gugu depends on both shared_preferences ^2.0.9 and flutter_audio_recorder 0.5.5, version solving failed.)
How do I fix this error?
This is a common issue when you are trying to install new plugins.
try to downgrade shared_references version to non null safety version
example:
shared_preferences: ^0.5.6
or try another versions until they are both compatible.

Flutter intl version conflict

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.)
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
You can resolve the issue by settings the 'any' to resolve issue
https://stackoverflow.com/a/65971167/14950155
Intl: any

version solving failed when try get pubspec.yaml

I facing issue that show up to me that message when Trying to get packages
Running "flutter pub get" in stok_app_a...
Because no versions of in_app_purchase match >0.2.2+4 <0.3.0 and in_app_purchase 0.2.2+4 depends on json_annotation ^2.0.0, in_app_purchase ^0.2.2+4 requires json_annotation ^2.0.0.
And because every version of speech_to_text depends on json_annotation
^3.0.0, in_app_purchase ^0.2.2+4 is incompatible with speech_to_text.
So, because stok_app_a depends on both speech_to_text ^0.7.0 and
in_app_purchase ^0.2.2+4, version solving failed. pub get failed (1;
So, because stok_app_a depends on both speech_to_text ^0.7.0 and
in_app_purchase ^0.2.2+4, version solving failed.) exit code 1
I solved this issue by assignment dependency_overrides in pubspec.yaml file like that
dependency_overrides:
json_annotation: ^2.0.0
to override the json_annotation 2.0.0