I'm installing 2 packages: rxdart and flutter_plugin_pdf_viewer
rxdart: ^0.23.1
flutter_plugin_pdf_viewer: ^1.0.7
but flutter_plugin_pdf_viewer >=1.0.4 is forbidden.
and this is error message:
Because flutter_plugin_pdf_viewer >=1.0.4 depends on rxdart ^0.21.0 and flutterattendancesystem depends on rxdart ^0.23.1, flutter_plugin_pdf_viewer >=1.0.4 is forbidden.
So, because flutterattendancesystem depends on flutter_plugin_pdf_viewer ^1.0.7, version solving failed.
pub upgrade failed (1; So, because flutterattendancesystem dep
ends on flutter_plugin_pdf_viewer ^1.0.7, version solving failed.)
Look at this thread https://github.com/CrossPT/flutter_plugin_pdf_viewer/issues/59
This repo is not maintained properly,
You can use a different package for pdf viewer.
or for a temporary fix do a following
Manually edit the pubspec.yaml in flutter_plugin_pdf_viewer-1.0.7 folder in .pub-cache and set rxdart: ^0.21.0 to rxdart: ^0.23.1.
In flutter_plugin_pdf_viewer-1.07/lib/src/document.dart at line no: 89, changed Observable to Stream.
Related
I am getting the following version resolving error and I am wondering if anybody has an idea for a workaround?
Pub Spec
purchases_flutter: ^3.10.0
flutter_stripe: ^3.3.0
freezed_annotation: ^2.1.0
ERROR:
Because purchases_flutter 3.10.0 depends on freezed_annotation ^1.1.0 and no versions of purchases_flutter match >3.10.0 <4.0.0, purchases_flutter ^3.10.0 requires freezed_annotation ^1.1.0.
So, because multiculturalapp depends on both purchases_flutter ^3.10.0 and freezed_annotation ^2.1.0, version solving failed.
pub get failed (1; So, because multiculturalapp depends on both purchases_flutter ^3.10.0 and freezed_annotation ^2.1.0, version solving failed.)
You're seeing the error because purchases_flutter depends on version ^1.1.0 of freezed_annotation, which means it needs a version that is at least 1.1.0, but lower than 2.X.X. However, you're specifying freezed_annotation: ^2.1.0, which means you're saying you need 2.1.0 or higher, but lower than 3.X.X.
There's no way to resolve that conflict, so you see the error.
Can you switch to freezed_annotation: ^1.1.0?
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
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
flutter_cache_manager and cached_network_image is successfully instaled.
flutter_cache_manager: ^1.1.3
cached_network_image: ^1.1.3
When try install simple_slider: ^0.0.2 get below error
Because every version of simple_slider depends on cached_network_image ^0.4.1 and first_flutter_app depends on cached_network_image ^1.1.3, simple_slider is forbidden.
So, because first_flutter_app depends on simple_slider ^0.0.2, version solving failed.
pub get failed (1)
try:
simple_slider: any
hope it helped