version solving failed. Pubspec yaml, flutter - flutter

Because every version of anyline depends on permission_handler ^5.0.1+1 and motorgate depends on permission_handler ^8.3.0, anyline is forbidden.
So, because motorgate depends on anyline ^24.0.0-dev.1, version solving failed.
pub get failed (1; So, because motorgate depends on anyline ^24.0.0-dev.1, version solving failed.)
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: ^1.0.2
http: ^0.13.4
json_annotation: ^4.3.0
flutter_icons: ^1.1.0
provider: ^6.0.1
shared_preferences: ^2.0.8
material_design_icons_flutter: 5.0.5955-rc.1
start_jwt: ^0.2.0
fluttertoast: ^8.0.8
flutter_pw_validator: ^1.3.0
cool_alert:
rflutter_alert: ^2.0.4
whatsapp_unilink: ^2.0.0
url_launcher: ^6.0.15
flutter_launch: ^0.3.0
geolocator: ^7.7.1
geocoding: ^2.0.1
google_sign_in: ^5.2.1
flutter_facebook_auth:
flutter_animated_dialog: ^2.0.1
flutter_barcode_scanner: ^2.0.0
restart_app: ^1.1.0
permission_handler: ^8.3.0
anyline: ^24.0.0-dev.1

anyline is outdated and not compatible with your other packages. You would have to downgrade permission_handler to version ^5.0.1+1 to be compatible, but this could cause other problems.

All I had to do was to use dependency override.

Related

Flutter version solving failed,google_map_location_picker

I am trying to add google_maps_flutter and google_map_location_picker in flutter project to use it,but the problem is that the last version ^4.1.7 isn't compatible with other packages in App,and i get every time this error:
because myapp depends on both image_picker ^0.8.4+2 and google_maps_flutter ^1.1.0, version solving failed.
full error:
Because image_picker >=0.7.4 depends on flutter_plugin_android_lifecycle ^2.0.1 and google_maps_flutter >=0.5.22 <2.0.0-nullsafety depends on flutter_plugin_android_lifecycle ^1.0.0, image_picker >=0.7.4 is incompatible with google_maps_flutter >=0.5.22 <2.0.0-nullsafety.
So, because myapp depends on both image_picker ^0.8.4+2 and google_maps_flutter ^1.1.0, version solving failed.
pub get failed (1; So, because myapp depends on both image_picker ^0.8.4+2 and google_maps_flutter ^1.1.0, version solving failed.)
the problem is not in image_picker alone,but in most packages in pubspec.yaml file
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
flutter_swiper: ^1.1.6
table_calendar: ^2.1.0
google_nav_bar: ^5.0.5
line_icons: ^2.0.1
dio: ^1.0.0
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
fluttertoast: ^8.0.8
carousel_slider: ^4.0.0
flag: ^5.0.1
firebase_core: ^1.6.0
cloud_firestore: ^2.5.3
firebase_storage: ^10.0.4
firebase_auth: ^3.1.1
image_picker: ^0.8.4+2
xfile: ^1.1.0
getwidget: ^2.0.3
path: ^1.8.0
path_provider: ^2.0.5
cached_network_image: ^3.1.0
flutter_datetime_picker: ^1.5.1
url_launcher: ^6.0.12
google_maps_flutter: ^0.5.30
google_map_location_picker: ^3.3.4
Is there a good solution to avoid conflict between packages version?
Replace the pubyaml plugin version with this code. This will remove the conflict.
cupertino_icons: ^1.0.2
flutter_swiper: ^1.1.6
table_calendar: ^2.1.0
google_nav_bar: ^5.0.5
line_icons: ^2.0.1
dio: ^1.0.0
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
fluttertoast: ^8.0.8
carousel_slider: ^4.0.0
flag: ^5.0.1
firebase_core: ^0.5.3
cloud_firestore: ^0.5.0
firebase_storage: ^5.0.1
firebase_auth: ^0.6.2+1
image_picker: 0.8.0+4
xfile: ^1.1.0
getwidget: ^2.0.3
path: ^1.8.0
path_provider: ^2.0.5
cached_network_image: ^3.1.0
flutter_datetime_picker: ^1.5.1
url_launcher: ^6.0.5
google_maps_flutter: ^2.0.10
google_map_location_picker: ^4.1.7

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

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

No named parameter with the name 'resizeToAvoidBottomPadding'

I try to run my app on VSCode but I get this error:
I've tried to update flutter version/pubspec packages version/flutter clean/delete the build folder and run again. But nothing seems to work.
this is my pubspec.yaml
add_2_calendar: ^2.0.1
add_2_calendar: ^2.0.1
camera: ^0.7.0+2
charts_flutter: ^0.10.0
cupertino_icons: ^1.0.2
device_calendar: ^3.1.0
dio: ^3.0.10
dio_http_cache: ^0.2.9
expandable: ^5.0.1
firebase_core: ^0.7.0
firebase_database: ^6.0.0
firebase_messaging: ^8.0.0-dev.15
fl_chart: ^0.35.0
flick_video_player: ^0.1.1
flutter_email_sender: ^5.0.0
flutter_form_builder: ^6.0.0-nullsafety.1
flutter_icons: ^1.1.0
flutter_linkify: ^5.0.0
flutter_paginator: ^0.0.6
flutter_svg: ^0.19.3
flutter_widget_from_html: ^0.5.0+3
fluttericon: ^2.0.0
gallery_saver: ^2.0.1
geolocator: ^6.2.1
get_it: ^6.0.0
http: ^0.12.0+2
image_picker: ^0.6.2+3
intl: ^0.17.0
mailer: ^5.0.0
overlay_support: ^1.0.5
path_provider: ^1.6.11
permission_handler: ^5.0.1+1
provider: ^4.0.5
splashscreen: ^1.2.0
timeline_tile: ^2.0.0
url_launcher: ^5.5.0
video_player: ^0.10.12+2
weather_icons: ^2.0.2
webview_flutter: ^1.0.7
flutter --version
flutter doctor
The reason you get this is that you use flutter_widget_from_html, that has no null safe version yet, this package depends on old version of chewie (v0.10.4), that uses deprecated property of Scaffold resizeToAvoidBottomPadding.
What you can do is to downgrade your Flutter SDK to pre null-safety version, or rewrite your code without using flutter_widget_from_html package in favor for example chewie, that already has null safety widget.
You can check more info about migrating to null safety here.
If you are willing to downgrade your SDK to pre-null safety you can use this answer.

firebase messaging and flutter sdk driver version solving failed

Details about issue : Because every version of flutter_driver from sdk depends on process 4.0.0-nullsafety.2 which depends on platform ^3.0.0-nullsafety.1, every version of flutter_driver from sdk requires platform ^3.0.0-nullsafety.1.
And because firebase_messaging >=0.2.0 <7.0.2 depends on platform ^2.0.0, flutter_driver from sdk is incompatible with firebase_messaging >=0.2.0 <7.0.2.
So, because receiptree depends on both firebase_messaging ^6.0.13 and flutter_driver any from sdk, version solving failed.
Running "flutter pub get" in working...
pub get failed (1; So, because xxxx depends on both firebase_messaging ^6.0.13 and flutter_driver any from sdk, version solving failed.)
Please help me to format below code
version: 0.9.9-beta+9
environment:
sdk: ">=2.7.0 <3.0.0"
depedencies:
Auth
firebase_auth: ^0.15.5+3
google_sign_in: ^4.4.0
flutter_facebook_login: ^3.0.0
apple_sign_in: ^0.1.0
Notification
firebase_messaging: ^6.0.13
firebase_dynamic_links: ^0.5.0+11
fluttertoast: ^4.0.1
Core
provider: ^4.0.4
auto_route: ^0.4.2
flutter_mobx: ^1.1.0
mobx: ^1.1.1
mobx_codegen: ^1.0.3
firebase_ml_vision: ^0.9.3+8
Dependency injection
inject:
git:
url: https://github.com/google/inject.dart.git
path: package/inject
ref: 7c3cbf6
Storage
shared_preferences: ^0.5.6+3
firebase_storage: ^3.1.5
cloud_firestore: ^0.13.4+2
UI
photo_view: ^0.9.2
flutter_page_indicator: 0.0.3
datetime_picker_formfield: ^1.0.0
image_picker: ^0.6.4
flutter_datetime_picker: ^1.4.0
image_cropper: ^1.2.1
flutter_typeahead: ^1.8.0
flutter_masked_text: ^0.8.0
video_player: null
Utility
flutter_svg: ^0.18.1
flutter_image_compress: ^0.6.5+1
firebase_analytics: ^5.0.11
firebase_crashlytics: ^0.1.3+3
package_info: ^0.4.0+16
http: ^0.12.2
dartz: ^0.9.1
faker: ^1.2.1
intl: ^0.16.1
printing: ^3.6.0
image_gallery_saver: ^1.5.0
dio: ^3.0.10
flutter_email_sender: ^3.0.1
Unknown
path_provider: ^1.6.5
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
random_string: ^2.1.0
permission_handler: ^5.0.1+1
share: ^0.6.5+2
url_launcher: ^5.7.1
dev_dependencies:
flutter_test:
sdk: flutter
mockito: ^4.1.1
flutter_driver:
sdk: flutter
test: any
timeago: ^2.0.26
flutter_launcher_icons: ^0.8.0
auto_route_generator: ^0.4.0
build_runner: null
inject_generator:
git:
url: https://github.com/google/inject.dart.git
path: package/inject_generator
ref: 7c3cbf6
I faced the same problem. The problem is coming from firebase messaging.
Currently, you have:
firebase_messaging: ^6.0.13
which limits firebase messaging to a version 6.
Replace it with
firebase_messaging: ^7.0.0
And it should solve your issue.