Because every version of flutter_driver from sdk depends on crypto 3.0.0 and Cruise depends on crypto 2.1.3, flutter_driver from sdk is forbidden - flutter

When I compile my project, it shows this error:
Running "flutter pub get" in cruise-open...
Because every version of flutter_driver from sdk depends on crypto 3.0.0 and Cruise depends on crypto 2.1.3, flutter_driver from sdk is forbidden.
So, because Cruise depends on flutter_driver any from sdk, version solving failed.
pub get failed (1; So, because Cruise depends on flutter_driver any from sdk, version solving failed.)
I have tried each version of crypto but still not fix my problem, what should I do to solve it? This is my pubspec.yaml:
name: Cruise
description: A RSS article read Flutter application.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
intl: 0.16.1
meta: ^1.1.8
flutter_svg: 0.19.0
logger: 0.9.4
marquee: ^1.7.0
scoped_model: ^1.1.0
shrine_images: ^1.1.2
flare_dart: 2.3.4
flare_flutter: ^2.0.2
vector_math: ^2.0.8
collection: ^1.14.0
package_info: ^0.4.0
fluttertoast: 7.1.6
google_fonts: 1.0.0
flutter_staggered_grid_view: ^0.3.0
adaptive_breakpoints: ^0.0.2
cupertino_icons: 1.0.0
http: ^0.12.0+2
flutter_icons: ^1.0.0
timeago: 2.0.26
animations: 1.1.2
flutter_hooks: ^0.12.0
share: ^0.6.4+3
shimmer: 1.1.1
crypto: 2.1.3
url_launcher: 5.5.0
uni_links: 0.4.0
flutter_html: 1.2.0
shared_preferences: ^0.5.8
state_notifier: ^0.5.0
flutter_secure_storage: 3.3.3
flutter_slidable: "^0.5.5"
hive: ^1.4.1+1
#fluwx: ^2.4.1
pull_to_refresh: 1.6.3
intl_phone_number_input: ^0.5.0
dio: 3.0.10
fish_redux: 0.3.4
hive_flutter:
git:
url: https://github.com/hivedb/hive.git
path: hive_flutter
dev_dependencies:
flutter_test:
sdk: flutter
flutter_driver:
sdk: flutter
test:
path:
args:
grinder: ^0.8.0
pedantic: ^1.9.0
string_scanner: ^1.0.5
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
generate: true

The problem lies here crypto: 2.1.3. You need to update it to the latest version i. e. crypto: ^3.0.0.
This should solve your issue.
What happens is that when you use so many packages, some of those packages use some other packages. It may so happen that two or more packages use the same package.
In your case, the package flutter_driver uses the package crypto. And you yourself are using the package crypto but a different version of it. So, it creates an error because you cannot have two different versions of the same package.

Related

Flutter path_provider and connectivity_plus version solving failed

I can't install Flutter's connectivity package due to a version conflicting issue with the path_provider package. I tried exchanging different versions of both packages but no luck. Can anyone please guide me on how to fix this issue here?
Error on Log :
Because connectivity_plus >=1.0.2 depends on connectivity_plus_platform_interface ^1.0.2 which depends on plugin_platform_interface ^2.0.0, connectivity_plus >=1.0.2 requires plugin_platform_interface ^2.0.0.
And because path_provider >=1.6.4 <2.0.0-nullsafety depends on path_provider_platform_interface ^1.0.1 which depends on plugin_platform_interface ^1.0.1, connectivity_plus >=1.0.2 is incompatible with path_provider >=1.6.4 <2.0.0-nullsafety.
So, because cliffjumper depends on both path_provider ^1.6.11 and connectivity_plus ^1.0.5, version solving failed.
pub get failed (1; So, because cliffjumper depends on both path_provider ^1.6.11 and connectivity_plus ^1.0.5, version solving failed.)
In pubspec.yaml file :
enter code version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.3
rxdart: ^0.26.0
sqflite: ^1.3.1
path_provider: ^1.6.11
http: ^0.12.1
#flutter_facebook_login: ^3.0.0
#google_sign_in: ^4.5.1
flutter_blue: ^0.8.0
google_maps_flutter: ^2.0.5
geolocator: ^6.1.6
device_info: ^2.0.0
shared_preferences: ^0.5.10
crypto: ^3.0.1
uuid: ^3.0.4
latlong: ^0.6.1
geocoder: ^0.2.1
us_states: ^1.0.3
package_info: ^0.4.3+2
weather: ^1.2.4
connectivity_plus: ^1.0.5
try to update all the plugins to their latest version or simply use 'any' keyword instead of version code

So, because postureapp depends on both audioplayers ^0.17.0 and flutter_driver any from sdk, version solving failed

After a long time, I am trying to run my flutter project that used to run successfully. After doing flutter upgrade, I get the following dependency error. I have tried multiple possible fixes from similar issues I have found, but I still get similar errors. Any help is much appreciated.
Because audioplayers >=0.16.2 <0.18.0 depends on uuid ^2.2.2 and no versions of uuid match >2.2.2 <3.0.0, audioplayers >=0.16.2 <0.18.0 requires uuid 2.2.2.
And because uuid 2.2.2 depends on crypto ^2.0.0 and every version of flutter_driver from sdk depends on crypto 3.0.1, audioplayers >=0.16.2 <0.18.0 is incompatible with flutter_driver from sdk.
So, because postureapp depends on both audioplayers ^0.17.0 and flutter_driver any from sdk, version solving failed.
pub get failed (1; So, because postureapp depends on both audioplayers ^0.17.0 and flutter_driver any from sdk, version solving failed.)
exit code 1
my pubspec.yaml file:
environment:
sdk: ">=2.2.0 <3.0.0" # ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.2
image_picker: ^0.6.5
firebase_core: ^1.0.0 #^0.7.0
firebase_ml_vision: ^0.10.0 #^0.9.3+8
camera: ^0.8.0 #^0.5.6+1
smooth_page_indicator: ^0.1.5
simple_animations: ^2.1.1
flutter_statusbarcolor: ^0.2.3
gradient_widgets: ^0.5.1
time: "^1.3.0"
audioplayers: ^0.17.0 #^0.15.1
path_provider: ^1.6.0 #^1.5.1
wakelock: ^0.1.4+1
poller: ^1.1.3
permission_handler: ^6.1.0
mutex: ^1.1.0
dependency_overrides:
path_provider: ^2.0.0
dev_dependencies:
pedantic: ^1.8.0
e2e: ^0.2.1
flutter_test:
sdk: flutter
flutter_driver:
sdk: flutter
test: any
path: ^1.6.2
flutter_launcher_icons: ^0.8.1
flutter_launcher_name: ^0.0.1
# path_provider: ^0.5.0+1
flutter_icons:
image_path: "assets/images/logo.png"
android: true
ios: true
flutter_launcher_name:
name: "MyApp"
flutter:
uses-material-design: true
assets:
- assets/images/
- assets/sounds/
Removing the version number of audioplayer, and some other libraries fixed the issue.

How to get the matching version of shared preferences, upgradder and other packages?

I have a problem on matters upgrader, it's seems i can't build my apps when it come to difference version off package
here is the problem
Running "flutter pub get" in Mobile7Merge...
Because requests 3.3.0 depends on shared_preferences ^0.5.2 and no versions of requests match >3.3.0 <4.0.0, requests ^3.3.0 requires shared_preferences ^0.5.2.
So, because mobile7 depends on both requests ^3.3.0 and shared_preferences ^2.0.3, version solving failed.
pub get failed (1; So, because mobile7 depends on both requests ^3.3.0 and shared_preferences ^2.0.3, version solving failed.)
here is my pubspec.yaml
name: mobile7
description: Mobile 7
version: 1.0.0+1
environment:
sdk: ">=2.5.2 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.2
http: ^0.12.1
lazy_load_scrollview: ^1.1.0
flutter_appauth: ^0.9.1
flutter_secure_storage: ^3.3.3
fl_chart: ^0.10.1
flutter_datetime_picker: ^1.3.8
intl: ^0.16.1
google_nav_bar: ^2.2.0
line_icons: ^0.2.0
google_fonts: ^1.1.0
equatable: ^1.2.5
bloc: ^6.0.3
flutter_bloc: ^6.0.5
rxdart: ^0.23.1
expandable: ^4.1.4
jiffy: ^3.0.1
requests: ^3.3.0
flutter_html: ^1.0.0
webview_flutter: any
flutter_downloader: ^1.4.4
path_provider: ^1.6.24
permission_handler: ^5.0.1
fluttertoast: ^7.1.1
# flutter_cached_pdfview: ^0.3.0
# flutter_pdfview: ^1.0.0+10
upgrader: ^3.0.0
dio: any
advance_pdf_viewer: ^1.2.0
pinch_zoom: ^0.0.4
dart_date: ^1.0.7
flutter_inappwebview: ^4.0.0+4
shared_preferences: ^2.0.3
# shared_preferences: ^0.5.2
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
- images/
I thought to have two package at the same time, that is 2.0.3 and 0.5.2 but either any of them have solve my problem, i tried to search if i can use two package with the same name but mainly, thos shared_preference are inside request package and upgrader package, i tried to include there on my own
How can i solve this??
Managing dependencies can be a pain some times but I have found this commands can be useful:
flutter pub outdated https://dart.dev/tools/pub/cmd/pub-outdated
flutter pub upgrade --major-versions https://dart.dev/tools/pub/cmd/pub-upgrade#--major-versions

Because Cruise depends on intl >=0.17.0-nullsafety which requires SDK version >=2.11.0-180.0.dev <3.0.0, version solving failed

Today when I compile my project, it shows this error:
The current Dart SDK version is 2.10.5.
Because Cruise depends on intl >=0.17.0-nullsafety which requires SDK version >=2.11.0-180.0.dev <3.0.0, version solving failed.
pub get failed (1; Because Cruise depends on intl >=0.17.0-nullsafety which requires SDK version >=2.11.0-180.0.dev <3.0.0, version solving failed.)
Process finished with exit code 1
this is my intl dependencies:
intl: 0.17.0
I do not add the intl >=0.17.0-nullsafety dependencies. why have this error and what should I do to fix it? this is the full pubspec.yaml:
name: Cruise
description: A RSS article read Flutter application.
publish_to: 'none'
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
intl: 0.17.0
meta: ^1.1.8
flutter_svg: 0.19.0
logger: 0.9.4
scoped_model: ^1.1.0
shrine_images: ^1.1.2
flare_dart: 2.3.4
flare_flutter: ^2.0.2
vector_math: ^2.0.8
collection: ^1.14.0
package_info: ^0.4.0
fluttertoast: 7.1.6
#google_fonts: 1.0.0
flutter_staggered_grid_view: ^0.3.0
adaptive_breakpoints: ^0.0.2
cupertino_icons: 1.0.0
http: ^0.12.0+2
flutter_icons: ^1.0.0
timeago: 2.0.26
animations: 1.1.2
flutter_hooks: ^0.12.0
share: ^0.6.4+3
shimmer: 1.1.1
crypto: 2.1.5
url_launcher: 5.5.0
uni_links: 0.4.0
flutter_html: 1.2.0
shared_preferences: ^0.5.8
state_notifier: ^0.5.0
flutter_secure_storage: 3.3.3
flutter_slidable: "^0.5.5"
hive: ^1.4.1+1
#fluwx: ^2.4.1
pull_to_refresh: 1.6.3
intl_phone_number_input: ^0.5.0
dio: 3.0.10
fish_redux: 0.3.4
hive_flutter: 0.3.1
dev_dependencies:
flutter_test:
sdk: flutter
test:
path:
args:
grinder: ^0.8.0
pedantic: ^1.9.0
string_scanner: ^1.0.5
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
generate: true
If you have updated flutter to the latest version, then in your pubspec.yaml you should have this line:
environment:
sdk: ">=2.12.0 <3.0.0"

Flutter image version issue

I have just upgraded my flutter version and now I am facing the following issue when I get the packages in pubsec.yml file:
Because every version of flutter_test from sdk depends on image 2.1.4 and Instant_Feedback depends on image ^2.1.9, flutter_test from sdk is forbidden.
So, because Instant_Feedback depends on flutter_test any from sdk,
version solving failed. pub get failed (1; So, because
Instant_Feedback depends on flutter_test any from sdk, version solving
failed.)
My pubsec.yml file
dependencies:
flutter:
sdk: flutter
http: ^0.12.0+2
shared_preferences: ^0.5.4+8
firebase_messaging: ^6.0.3
flutter_crashlytics: ^1.0.0
firebase_core: ^0.4.2+1
cupertino_icons: ^0.1.3
device_calendar: ^1.0.0+2
cloud_firestore: ^0.12.11
auto_size_text: ^2.1.0
flutter_expandable_menu: ^0.0.1
webview_flutter: ^0.3.17
flutter_spinkit: ^4.1.1+1
get_it: 2.1.0
bloc: ^0.15.0
flutter_bloc: 0.21.0
equatable: 0.5.1
rflutter_alert: ^1.0.3
expandable: ^3.0.1
connectivity: ^0.4.6
firebase_auth: ^0.15.1
flutter_email_sender: ^2.2.1
mockito: 4.1.1
flutter_secure_storage: ^3.3.1+1
image_picker: ^0.6.2+2
async: any
image: ^2.1.10
image_crop: ^0.3.1
flutter_cache_manager: ^1.1.3
circular_profile_avatar: ^1.0.3
package_info: ^0.4.0+12
flutter_local_notifications: ^0.8.4+3
flutter_webview_plugin: ^0.3.10
url_launcher: ^5.2.7
flutter_localizations:
sdk: flutter
flutter_cupertino_localizations: ^1.0.1
dev_dependencies:
flutter_driver:
sdk: flutter
test: any
ozzie: 2.0.1
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
- lib/app/assets/images/
- lib/app/assets/flags/
- lang/en.json
- lang/de.json
Because every version of flutter_test from sdk depends on image 2.1.4 and Instant_Feedback depends on image ^2.1.9, flutter_test from sdk is forbidden.
I faced the same issue. Couldn't find the specific reason for the flutter_test depending on a specific version of this image library. Maybe it's an issue from the flutter side. So here are some workaround solutions:
comment out the flutter_test dev_dependency.
dev_dependencies:
# flutter_test:
# sdk: flutter
set the required version.
Instead of 2.1.12, I set the Image package version to 2.1.4 (as requested in the error message)
image: ^2.1.4
If more than one packages versions are noncompatible to each other, and you don't know their exact compatible version, you can find it by setting both the conflicting dependencies to any, e.g.
flutter_crashlytics: any
firebase_core: any
This will automatically figure out the compatible package version. Check these new compatible versions in pubspec.lock file, which will be auto-generated by running flutter package get.
# Generated by pub
# See https://www.dartlang.org/tools/pub/glossary#lockfile
packages:
flutter_crashlytics:
...
version: "1.0.0"
firebase_core:
...
version: "0.4.2+1"
Replace any with those correct versions.
flutter_crashlytics: 1.0.0
firebase_core: 0.4.2+1
Note: You should never leave your versions as any