Home > Software design >  Package incompatibility - Flutter
Package incompatibility - Flutter

Time:09-22

How to solve this error?

Because no versions of flutter_local_notifications match >11.0.0 <12.0.0 and flutter_local_notifications 11.0.0 depends on flutter_local_notifications_linux ^1.0.0, flutter_local_notifications ^11.0.0 requires flutter_local_notifications_linux ^1.0.0. And because no versions of flutter_local_notifications_linux match >1.0.0 <2.0.0 and flutter_local_notifications_linux 1.0.0 depends on dbus ^0.7.1, flutter_local_notifications ^11.0.0 requires dbus ^0.7.1. Because dbus >=0.7.4 depends on xml ^6.1.0 and dbus >=0.2.0 <0.7.4 depends on xml ^5.0.0, dbus >=0.2.0 requires xml ^5.0.0 or ^6.1.0. Thus, flutter_local_notifications ^11.0.0 requires xml ^5.0.0 or ^6.1.0. And because excel >=1.0.4 <2.0.0-null-safety depends on xml ^4.1.0, flutter_local_notifications ^11.0.0 is incompatible with excel >=1.0.4 <2.0.0-null-safety. So, because sambo_school_app depends on both excel ^1.1.5 and flutter_local_notifications ^11.0.0, version solving failed. pub get failed (1; So, because sambo_school_app depends on both excel ^1.1.5 and flutter_local_notifications ^11.0.0, version solving failed.) exit code 1

CodePudding user response:

Flutter packages can use the same dependencies. So when you have two packages that do not use the same versions of the dependency in question you will get the message you have in your question. To solve this you have two possibilities:

  • Increase or decrease the version of one or both packages to find two versions that are compatible
  • Look for another package that performs the same task if the package you are using has been discontinued for several years and because of this they are using too old dependencies

CodePudding user response:

You can update your Flutter sdk or if you do not want to update the Sdk then find the one package version that matches your dart version on pub dev version tab on this package doc page on pub dev. Like minimum sdk for flutter_local_notifications version 11.0.0 is 2.15.

https://pub.dev/packages/flutter_local_notifications/versions

  • Related