I added 'firebase_database' to pubspec.yaml and got the following error:
[components] flutter pub get
Running "flutter pub get" in components...
Because firebase_core >=1.0.0 <1.1.1 depends on firebase_core_platform_interface ^4.0.0 and firebase_core >=1.1.1 depends on firebase_core_platform_interface ^4.0.1, firebase_core >=1.0.0 requires firebase_core_platform_interface ^4.0.0.
And because firebase_database >=6.1.2 <7.0.0-dev.1 depends on firebase_core ^1.0.3, firebase_database >=6.1.2 <7.0.0-dev.1 requires firebase_core_platform_interface ^4.0.0.
And because firebase_core_platform_interface >=4.0.0 depends on plugin_platform_interface ^2.0.0 and path_provider_platform_interface <2.0.0-nullsafety depends on plugin_platform_interface ^1.0.1, firebase_database >=6.1.2 <7.0.0-dev.1 is incompatible with path_provider_platform_interface <2.0.0-nullsafety.
And because shared_preferences_windows <0.0.3-nullsafety depends on path_provider_platform_interface ^1.0.3 and shared_preferences 0.5.12+2 depends on shared_preferences_windows ^0.0.1, if firebase_database >=6.1.2 <7.0.0-dev.1 and shared_preferences 0.5.12+2 then shared_preferences_windows ^0.0.3-nullsafety.
And because shared_preferences_windows >=0.0.3-nullsafety <2.0.0 depends on shared_preferences_platform_interface ^2.0.0-nullsafety and shared_preferences 0.5.12+2 depends on shared_preferences_platform_interface ^1.0.0, firebase_database >=6.1.2 <7.0.0-dev.1 is incompatible with shared_preferences 0.5.12+2.
So, because components depends on both shared_preferences 0.5.12+2 and firebase_database ^6.1.2, version solving failed.
pub get failed (1; So, because components depends on both shared_preferences 0.5.12+2 and firebase_database ^6.1.2, version solving failed.)
exit code 1
This is my list of dependancies:
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
google_maps_flutter: ^1.0.6
http: ^0.12.0
json_serializable: ^3.3.0
bloc: ^6.1.0
flutter_bloc: ^6.1.0
equatable: ^1.2.5
graphql: ^4.0.1
graphql_flutter: ^4.0.1
flutter_google_places: ^0.2.4
google_maps_webservice: ^0.0.16
fluster: ^1.1.2
flutter_cache_manager: ^1.4.1
sliding_up_panel: ^1.0.2
image: ^2.1.14
flutter_svg: ^0.19.3
lottie: ^0.6.0
shared_preferences: '0.5.12+2'
intl: ^0.17.0
latlong: ^0.6.1
polyline: ^1.0.2
geolocator: ^5.3.1
auto_size_text_field: ^0.1.7
path_drawing: ^0.4.1
flutter_native_timezone: ^1.0.10
auto_size_text: ^2.1.0
charts_flutter: ^0.10.0
webview_flutter: ^2.0.4
firebase_database: ^6.1.2
Probably the dependency of package.
but if you still want to run it just don't specify the version,
just :
ex
firebase_core:
firebase_database:
Related
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
This is a part of my pubspec.yaml file
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
http: ^0.13.3
syncfusion_flutter_calendar: ^18.4.47
flutter_chat_bubble: ^1.0.2
intl: ^0.17.0
flutter_local_notifications: ^4.0.1+2
provider: ^5.0.0
sqflite_sqlcipher: ^2.0.0
logging: ^1.0.1
grouped_list: ^3.5.0
visibility_detector: ^0.1.5
smart_select: ^4.3.2
dropdown_search: ^0.5.0
synchronized: ^3.0.0
local_auth: ^1.1.5
font_awesome_flutter: ^9.0.0
lite_rolling_switch: ^0.1.1
flutter_webview_plugin: ^0.3.11
email_validator: ^1.0.6
package_info: ^2.0.0
connectivity: ^3.0.3
device_info: ^2.0.0
encrypt: ^5.0.0
flutter_html: ^1.3.0
url_launcher: ^6.0.2
flutter_inappwebview: ^5.3.2
signalr_core: ^1.1.1
When I try to run the app I get this error
Running "flutter pub get" in mobile_app1...
Because no versions of signalr_core match >1.1.1 <2.0.0 and signalr_core 1.1.1 depends on tuple ^2.0.0, signalr_core ^1.1.1 requires tuple ^2.0.0.
And because no versions of tuple match >2.0.0 <3.0.0 and tuple 2.0.0 depends on quiver ^3.0.0, signalr_core ^1.1.1 requires quiver ^3.0.0.
And because flutter_layout_grid 0.10.5 depends on quiver ^2.0.0 and no versions of flutter_layout_grid match >0.10.5 <0.11.0, signalr_core ^1.1.1 is incompatible with flutter_layout_grid ^0.10.5.
And because flutter_html 1.3.0 depends on flutter_layout_grid ^0.10.5 and no versions of flutter_html match >1.3.0 <2.0.0, signalr_core ^1.1.1 is incompatible with flutter_html ^1.3.0.
So, because mobile_app1 depends on both flutter_html ^1.3.0 and signalr_core ^1.1.1, version solving failed.
pub get failed (1; So, because mobile_app1 depends on both flutter_html ^1.3.0 and signalr_core ^1.1.1, version solving failed.)
I solved this problem by adding this in my pubspec.yaml file
dependency_overrides:
quiver: ^3.0.0
Is there any better way to resolve this conflict?
Set them all toany, then run flutter pub get.
Now you can look in the pubspec.lock file and see what versions you got and put them in pubspec.yaml.
So I've been trying to get my packages to match the online migration guide: https://firebase.flutter.dev/docs/migration
But no matter what I do I always get a dependency error. Could you explain to me what I'm doing wrong ?
My latest error is this one:
Because url_launcher >=5.5.2 <5.7.7 depends on url_launcher_platform_interface ^1.0.8 and url_launcher >=5.4.1 <5.5.2 depends on url_launcher_platform_interface ^1.0.4, url_launcher >=5.4.1 <5.7.7 requires url_launcher_platform_interface ^1.0.4.
And because url_launcher_platform_interface >=1.0.4 <1.0.5 depends on plugin_platform_interface ^1.0.0, url_launcher >=5.4.1 <5.7.7 requires plugin_platform_interface ^1.0.0 or url_launcher_platform_interface ^1.0.5.
And because url_launcher >=5.7.7 <6.0.0-nullsafety depends on url_launcher_platform_interface ^1.0.9 which depends on plugin_platform_interface ^1.0.1, url_launcher >=5.4.1 <6.0.0-nullsafety requires plugin_platform_interface ^1.0.0.
Because cloud_firestore >=1.0.4 depends on cloud_firestore_platform_interface ^4.0.1 which depends on plugin_platform_interface ^2.0.0, cloud_firestore >=1.0.4 requires plugin_platform_interface ^2.0.0.
Thus, cloud_firestore >=1.0.4 is incompatible with url_launcher >=5.4.1 <6.0.0-nullsafety.
So, because XXXXX depends on both cloud_firestore ^1.0.5 and url_launcher ^5.5.1, version solving failed.
Here is my pubspec:
flutter_test:
sdk: flutter
flutter_launcher_icons: ^0.9.0
google_sign_in: ^5.0.2
provider: ^5.0.0
flutter_spinkit: ^5.0.0
shared_preferences: ^2.0.5
cached_network_image: ^3.0.0
flutter_statusbarcolor: ^0.2.3
pull_to_refresh: ^1.6.5
flutter_displaymode: ^0.1.1
curl: ^1.0.0
# random_user: ^0.3.0
share: ^2.0.1
mailto: ^2.0.0
pinput: ^1.2.0
cloud_firestore: ^1.0.5
cloud_functions: ^1.0.3
firebase_analytics: ^8.0.0
firebase_auth: ^1.1.0
firebase_core: ^1.0.3
firebase_crashlytics: ^2.0.0
firebase_database: ^7.0.0-dev.0
firebase_dynamic_links: ^2.0.0
firebase_messaging: ^9.1.1
firebase_performance: ^0.7.0
firebase_remote_config: ^0.10.0-dev.0
firebase_storage: ^8.0.3
dependency_overrides:
http: ^0.13.1
url_launcher: ^5.5.1`
Downgrading URL launcher fixed my problem, thanks !
I'm migrating from flutter 1 to flutter 2, and when I updated my packages from pubspec.yaml, I received this error:
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, path_provider >=1.6.4 <2.0.0-nullsafety requires plugin_platform_interface ^1.0.1.
And because firebase_messaging >=9.0.0 depends on firebase_core_platform_interface ^4.0.0 which depends on plugin_platform_interface ^2.0.0, path_provider >=1.6.4 <2.0.0-nullsafety is incompatible with firebase_messaging >=9.0.0.
So, because myApp depends on both firebase_messaging ^9.1.1 and path_provider ^1.6.5, version solving failed.
Running "flutter pub get" in myApp...
pub get failed (1; So, because myApp depends on both firebase_messaging ^9.1.1 and path_provider
^1.6.5, version solving failed.)
My pubspec.yaml archive:
version: 1.0.0+1
environment:
sdk: ">=2.2.2-dev.68.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
cupertino_icons: ^0.1.3
path_provider: ^1.6.5
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
You should try out with null safety
path_provider:
without version.
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.