Flutter dependency issue after upgrade - flutter

After upgrading flutter to - Channel stable, v1.12.13+hotfix.5, the plugins audio_service and story_view seems to have encountered a problem :
Because app depends on story_view ^0.11.0 which depends on rxdart ^0.22.2, rxdart ^0.22.2 is required.
So, because app depends on rxdart ^0.23.1, version solving failed.
pub get failed (1; So, because app depends on rxdart ^0.23.1, version solving failed.)
Process finished with exit code 1.
I am using
story_view: ^0.11.0
audio_service: ^0.5.6
Which are both the latest version now. Additionally I haven't added rxdart plugin to my project.

It looks like both story_view and audio_service depend on rxdart, but they're using incompatible versions which is causing version solving to fail.
There's a few options to move forward here:
File an issue against the story_view plugin requesting they update their rxdart dependency to the latest version
Find story_view in your .pub_cache on disk and manually modify the pubspec.yaml for your copy on disk (this should allow for your flutter pub get to perform version solving correctly)
Create a fork of story_view, update it's pubspec.yaml to depend on rxdart: ^0.23.1, and create a path dependency to it
Obviously, none of these solutions are ideal but that should be able to get you unblocked until story_view updates to the newest rxdart.

Related

flutter HERE Maps SDK - dependency on ffi: 1.0.0 - conflicting with another plugin

running into the following issue where Here SDK is conflicting with another plugin (file_picker)...
Because every version of here_sdk from path depends on ffi 1.0.0 and file_picker >=4.0.0 depends on ffi ^1.1.2, here_sdk from path is incompatible with file_picker >=4.0.0.
So, because AppName depends on both file_picker 4.1.3 and here_sdk from path, version solving failed.
pub get failed (1; So, because AppName depends on both file_picker 4.1.3 and here_sdk from path, version solving failed.)
The issue is the "ffi: 1.0.0" in Here's pubspec.yaml which locks in version 1.0. For reference, I am using 4.8.3 of the SDK. Is there any reason why Here doesn't use the carat ^ notation so that pub can use the latest 1.x version and not the hardcoded 1.0.0 version? I can go in and change the pubspec.yaml version myself for Here SDK, but i don't want to introduce any incompatibility. Technically this should be ok because of semantic-versions, but of course i don't want to make any assumptions.
thoughts? thanks!
We are evaluating upgrading ffi version but there is no certain timeline on this by when this will be available. It is possible to change the ffi version in the pubspec.yml but as explained above that it is risky.

why does flutter show me this error and how can i solve it?

Good morning, I have a problem with the flutter app am using vscode, and after resolving the configuration's problems I have this problem and I couldn't solve it can you please help me with this?
when I run "flutter pub get" it shows me this message:
Because every version of flutter_test from SDK depends on meta 1.3.0
and active_ecommerce_flutter depends on meta ^1.4.0, flutter_test from
SDK is forbidden. So, because active_ecommerce_flutter depends on
flutter_test any from SDK, version solving failed. Running "flutter
pub get" in ACT... pub get failed
(1; So, because active_ecommerce_flutter depends on flutter_test any
from SDK, version solving failed.)
thank you for your collaboration.
This problem is because your flutter version is using meta 1.3.0and your active_ecommerce_flutter is using meta 1.4.0 causing a conflict.
Solution 1:
Upgrade your flutter version by typing flutter upgrade in the terminal.
However, at the point of time of writing this answer, the latest stable version of flutter is still using meta 1.3.0.
Thus, you will need to upgrade from a different channel than "stable", like (beta, dev, or master).
example:
flutter channel dev
flutter upgrade
Solution 2:
Try downgrading your active_ecommerce_flutter step by step till reaching a compatible version.
Solution 3: (Recommended)
Just add this line in your pubspec.yaml file:
dependency_overrides:
meta: ^1.3.0
This will force using meta: ^1.3.0
I think This is an SDK issue which you are using,
Upgrade your SDK from the following command:
flutter upgrade --force
OR
flutter upgrade
after upgrading SDK run flutter pub get
I hope this will fix your problem, Happy Fluttering.
I had this problem yesterday another package. I solved downgrade package version of troubled package. So you can try downgrade active_ecommerce_flutter

How can I avoid prerelease versions in Flutter?

Because null safety in flutter is relatively new, I had to depend on some prerelease versions.
However for some packages I would like to use the stable version.
The problem is: flutter don't let me use version 1.0.0 of hive_generator. It always selects 0.9.0-nullsafety.0.
dev_dependencies:
hive_generator: 1.0.0
Because every version of fast_i18n from git depends on build ^2.0.0 and hive_generator >=0.9.0-nullsafety.0 depends on build ^1.5.2, fast_i18n from git is incompatible with hive_generator >=0.9.0-nullsafety.0.
So, because ikus_app depends on both fast_i18n from git and hive_generator 1.0.0, version solving failed.
pub get failed (1; So, because ikus_app depends on both fast_i18n from git and hive_generator 1.0.0, version solving failed.)
Edit 1:
It seems that flutter prefers prereleases when prereleases are in dependency graph:
https://dart.dev/tools/pub/publishing#publishing-prereleases
Note: If a stable package in the dependency graph depends on a prerelease,
then pub chooses that prerelease instead of a stable release.
Is there anyway to opt-out one package?
My solution was to use the git version of hive_generator, because it must depend on build ^2.0.0.
I forgot that hive_generator 1.0.0 still depends on build ^1.5.2.
hive_generator >=0.9.0-nullsafety.0 is a display bug I think.

Added get it dependency. IDE gave version solving error

Because every version of integration_test from sdk depends on collection 1.15.0-nullsafety.5 and get_it >=6.0.0 depends on collection ^1.15.0, integration_test from sdk is incompatible with get_it >=6.0.0.
So, because mcuapp depends on both get_it ^6.0.0 and integration_test any from sdk, version solving failed.
pub get failed (1; So, because mcuapp depends on both get_it ^6.0.0 and integration_test any from sdk, version solving failed.)
Process finished with exit code 1
Note: I had recently upgraded Dart and flutter
You can try to remove the version int the pubspec.yaml and replace it with any.
This however might break code, since it will use an other version of the package. In some cases some packages are not compatible with other packages at all
Update all dependencies from pubspec.yaml file because some of your updated dependencies and depending on old version dependencies. Just
Go to [pub.dev][1] > search your dependencies > copy updated version to pubspec.yaml file > run flutter pub get > flutter pub upgrade
[1]: https://pub.dev/

Flutter issue - Flutter_driver from sdk depends on file 5.0.6 and flutter_gallery depends on file 5.0.7

I got this issue using flutter packages get:
Because every version of flutter_driver from sdk depends on file 5.0.6 and flutter_gallery depends on file 5.0.7, flutter_driver from sdk is forbidden.
So, because flutter_gallery depends on flutter_driver any from sdk, version solving failed.
pub upgrade failed (1)
I don't know what I am supposed to do here, I was trying to compile this flutter example: https://github.com/flutter/flutter/tree/master/examples/flutter_gallery
This may be because flutter dependencies are locked to fixed versions.
You can check this in the pubspec.yaml for flutter_driver which is in
\flutter\packages\flutter_driver
and compare it to the latest version at GitHub
If so, flutter upgrade won't necessarily update the dependencies versions. Doing a forced update of the packages may resolve your problem.
flutter update-packages --force-upgrade