I want to use both file_picker package and the open_file package but their latest versions is not compatible with eachother as you can se in the error message below.open_file has not been updated for the last 18 months so maybe it starts to get depricated?
Maybe there is another way to open a file instead of the open_file package?
Because if I want to use them both I have to switch to a very old version of file_picker.
The error message:
Because open_file >=3.1.0 depends on ffi ^1.0.0 and file_picker 5.2.4 depends on ffi ^2.0.1, open_file >=3.1.0 is incompatible with file_picker 5.2.4.
And because no versions of file_picker match >5.2.4 <6.0.0, open_file >=3.1.0 is incompatible with file_picker ^5.2.4.
So, because my_app depends on both file_picker ^5.2.4 and open_file ^3.2.1, version solving failed.
pub get failed (1; So, because my_app depends on both file_picker ^5.2.4 and open_file ^3.2.1, version solving failed.)
Override the package's ffi dependency Add dependency_overrides to pubspec.yaml
dependency_overrides:
ffi: ^2.0.1
Related
after upgrade flutter 3 I am facing this version solving issue.
HTML version not sported SVG
if I am choosing SVG different version so RANDOM_AVTAR is not sported.
both plugin sported or dependent on different version an I need all this how can I control this versions.
ERRORS:
Because every version of random_avatar depends on flutter_svg ^1.0.3 and demo depends on flutter_svg 0.23.0, random_avatar is forbidden.
So, because demo depends on random_avatar ^0.0.2, version solving failed.
pub get failed (1; So, because demo depends on random_avatar ^0.0.2, version solving failed.)
Running "flutter pub get" in fluter...
Because demo depends on flutter_html ^2.1.5 which depends on flutter_svg >=0.22.0 <1.0.0, flutter_svg >=0.22.0 <1.0.0 is required.
So, because demo depends on flutter_svg ^1.0.3, version solving failed.
pub get failed (1; So, because demo depends on flutter_svg ^1.0.3, version solving failed.)
Just for work around you can use
flutter_svg: ^1.1.6
flutter_html: 3.0.0-alpha.5
random_avatar: ^0.0.7
I've a wired problem with resolving dependencies. In my application pubspec I've following lines:
dependencies:
yet_another_layout_builder: ^0.1.0
dev_dependencies:
hive_generator: ^1.1.1
both packages uses analyzer package and flutter pub get reports me an error:
Because no versions of hive_generator match >1.1.1 <2.0.0 and hive_generator 1.1.1 depends on analyzer >=1.0.0 <3.0.0, hive_generator ^1.1.1 requires analyzer >=1.0.0 <3.0.0.
And because every version of yet_another_layout_builder depends on analyzer ^3.0.0, hive_generator ^1.1.1 is incompatible with yet_another_layout_builder.
So, because testApp depends on both yet_another_layout_builder ^0.1.0 and hive_generator ^1.1.1, version solving failed.
pub get failed (1; So, because testApp depends on both yet_another_layout_builder ^0.1.0 and hive_generator ^1.1.1, version solving failed.)
However when I look into github sources for those packages, it looks for me that this error shouldn't happen. For hive_generator pubspec have following restrictions:
dependencies:
analyzer: ">=1.0.0 <4.0.0"
and for YetAnotherLayoutBuilder pubspec have:
dependencies:
analyzer: ^3.0.0
So if I understands this notation correctly:
YetAnotherLayoutBuilder expects analyzer in version >=3.0.0 and <4.0.0
hive_generator expects analyzer in version >=1.0.0 and <4.0.0
Any suggestions where I'm mistaken are gladly welcome.
Right now nether hive_generator plugin have any upgrade then this version and nor yet_another_layout_builder has downgrade version. So to tackle these kinds of scenarios we have another method to add dependencies in Flutter which is dependency_overrides using this we can override some dependencies so that our app can use another version of the same dependency as well. So just add below code to your pubspecs.yaml file
dependency_overrides:
analyzer: ^2.8.0
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.
I have an error when i try to add a new plugin in my pubspec.yaml
i add the plugin : easy_localization: ^3.0.0
And i have this error message :
Because flutter_launcher_icons >=0.7.0 <0.9.0 depends on args ^1.5.0 and easy_localization >=3.0.0-nullsafety depends on args ^2.0.0, flutter_launcher_icons >=0.7.0 <0.9.0 is incompatible with easy_localization >=3.0.0-nullsafety.
So, because gameapp depends on both easy_localization ^3.0.0 and flutter_launcher_icons ^0.8.0, version solving failed.
pub get failed (1; So, because gameapp depends on both easy_localization ^3.0.0 and flutter_launcher_icons ^0.8.0, version solving failed.)
Could you try adding,
flutter_launcher_icons: ^0.9.0
args: ^2.0.0
easy_localization: ^3.0.0-nullsafety
to your pubspec.yaml and try saving it again to reload the packages?
The problem is: The library version you want to use is newer than Flutter, and there are two solutions
1: Go to the library website and click on the version and install an old library, for example (easy_localization: ^ 2.3.3)
2: Install the latest version of Flutter. Flutter2
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