I have recently decided to use Yo Yo Player for livestream video play,
Link: https://pub.dev/packages/yoyo_player
But After adding dependency in my pubspec.yaml file,
It gives me below error :
Because every version of yoyo_player depends on http ^0.12.2 and
yourapp depends on http ^0.13.0, yoyo_player is forbidden. So,
because yourapp depends on yoyo_player ^0.1.0, version solving
failed. pub get failed (1; So, because yourapp depends on yoyo_player
^0.1.0, version solving failed.)
I have tried changing versions but still issue persists.
Can anyone have idea to resolve this?
Related
I am trying to add Google Maps in Flutter but, I am getting this kind of error so, can you guys help me solve it.
Because search_map_place >=0.3.0 depends on http ^0.12.0+4 and fluttermaps depends on http ^0.13.5, search_map_place >=0.3.0 is forbidden.
So, because fluttermaps depends on search_map_place 0.3.0, version solving failed.
pub get failed (1; So, because fluttermaps depends on search_map_place 0.3.0, version solving failed.)
Remove the version numbers in pubspec.yaml
just put it like
search_map_place:
http:
and run pub get
I want to add avtar in my App but not able to do this because of dependency conflict/ required version error. I also trying to override dependency but its still not working. also trying this commands.
Flutter clean
Flutter pub get
But still not working.
ERROR:-
Because no versions of random_avatar match >0.0.7 <0.1.0 and random_avatar 0.0.7 depends on flutter_svg ^1.0.3, random_avatar ^0.0.7 requires flutter_svg ^1.0.3.
And because flutter_html >=2.0.0-nullsafety.1 <3.0.0-alpha.1 depends on flutter_svg >=0.22.0 <1.0.0, random_avatar ^0.0.7 is incompatible with flutter_html >=2.0.0-nullsafety.1 <3.0.0-alpha.1.
So, because seedwill_demo depends on both flutter_html ^2.2.1 and random_avatar ^0.0.7, version solving failed.
pub get failed (1; So, because seedwill_demo depends on both flutter_html ^2.2.1 and random_avatar ^0.0.7, version solving failed.)
I guess You working on Flutter 2, but Flutter 3 is released. On pub, some libraries are default compatible with Flutter 3. In this case, not always newest library is the best option. You must find which library is incompatible. Can You put pubspec.yaml to this post? We need TWO version of pubspec.yaml. Previous (which have no error with pub get) and new, with this new library. If You show them, I try find the best version of library for You.
I had problems that look alike, and somehow managed to eliminate them by upgrading flutter parts (updating or reinstalling). Have you tried following commands?
flutter clean
flutter upgrade
flutter pub upgrade
These were my dependencies in my pubspec.yaml:
dependencies:
...
image_picker: ^0.8.4+2
...
And everything worked fine, but now I added this:
dependencies:
...
image_picker: ^0.8.4+2
...
image_editor_pro: ^1.1.8
And running pub get I have this error:
Because image_editor_pro >=1.1.0 depends on image_picker ^0.7.4 and provauth depends on image_picker ^0.8.4+2, image_editor_pro >=1.1.0 is forbidden.
So, because provauth depends on image_editor_pro ^1.1.8, version solving failed.
pub get failed (1; So, because provauth depends on image_editor_pro ^1.1.8, version solving failed.)
I tried downgrading my version of image_picker but I get a new error:
Cannot open file, path = 'C:\Users\loren\flutter.pub-cache_temp\dir60565baa\test\fixtures\invalid\n_structure_<.>.json' (OS Error: Syntax of the name of the file, of the directory or of volume is not correct (This is my bad translation of the error).
, errno = 123)
pub get failed (66; , errno = 123))
What can I do to solve and use both the dependencies?
You can try to override the dependency so only one version is used for your project. Something like this:
name: your_app
dependencies:
image_picker: ^0.8.4+2
image_editor_pro: ^1.1.8
dependency_overrides:
image_picker: '0.8.4+2' # Use only this version for all the code depended on image picker
But you need to thoroughly tested the library that depends on the overrided dependency to check if it not introducing you a new error.
See https://dart.dev/tools/pub/dependencies#dependency-overrides
Seems like there is a conflict with image_editor_pro because the package is old.
It is better to look for another updated package with null safety, like image_editor 1.0.2, this won't have conflictions with image_picker 0.8.4+1.
And if you are willing to downgrade. ## Downgrading is a pain
You might need to downgrade the other dependencies as well. which might lead to Downgrading the Dart version.
After downgrading execute this command:
flutter clean
Then delete pubspec.lock file.
If a conflict between dependencies occurs, the simplest solution is to remove the version numbers of the two dependencies and then replace them with 'any' without the quotes in front of it. Then run pub get.
Hope you can help
I'm getting this error after updating flutter to version 1.25.0-8.1.pre-
Because `easy_localization` >=2.1.0+1 depends on `flutter_localizations` any from sdk which depends on `intl` 0.17.0-nullsafety.2, `easy_localization` >=2.1.0+1 requires `intl` 0.17.0-nullsafety.2.
So, because news_app depends on both `easy_localization` ^2.3.3 and `intl` ^0.16.1, version solving failed.
pub get failed (1; So, because news_app depends on both `easy_localization` ^2.3.3 and `intl` ^0.16.1, version solving failed.)
I have easy_localization 2.3.3, intl 0.16.0 and dart 2.12.0 installed. Please help
Basically what's happening is easy_localization uses a package which uses a newer version of intl. Basically, you're asking the package manager to handle two versions of the same package, there are two solutions.
Downgrade easy_localization package to a version which uses the same intl version (not recommended)
Upgrade your intl version to 0.17.0-nullsafety.2 (recommended, but null safecty is still in beta so you have to be aware of that)
Have a good day!
I think this is the best way to solve this,
You need to switch your flutter channel to a stable version, by running
flutter channel stable
in the command line. This will switch your channel to a stable version and will get rid of the error.
I hope this best solves your issue.
While trying to work with STOMP, websockets, facing issue for "packages get" after updating pubspec with required stomp/websocket details. I have tried for stomp, stompdart, websocket none of them worked.
Error observed while running "packages get" is
"The current Dart SDK version is 2.1.0-dev.4.0.flutter-4eb879133a.
Because project_name depends on stompdart >=0.0.2 which requires SDK version >=1.5.0 <2.0.0, version solving failed.
pub upgrade failed (1)"
If I try to downgrade flutter version then it has thrown exception informing 'current project needs SDK version > 2.0.0
Please help to clear the issue or suggest some other way as I am using STOMP at server end.
had the same issue, it can be solved in two ways:
solved it by adding this to my yaml file :
dependency_overrides:
stomp: ^0.7.3
dependencies:
stomp: ^0.7.3
flutter:
sdk: flutter
using the dependency_overrides works.
Secondly by running "pub upgrade" in your project directory
https://github.com/rikulo/stomp/issues/18#issuecomment-435748215
Well, this is not a definitive answer, but it may help you.
I forked a chinese library that seems to work named JStomp and did some translations. Let me know if it work since I am also interested to be able to work with STOMP on Flutter.
Here's my fork: https://github.com/raedcran/flutter_jstomp