I am facing the below error while adding firebase_storage: ^7.0.0 in my flutter web application .
Because every version of integration_test from sdk depends on crypto 3.0.0 and every version of firebase_storage_web depends on crypto ^2.1.5, integration_test from sdk is incompatible with firebase_storage_web.
And because firebase_storage >=7.0.0 depends on firebase_storage_web ^0.1.1+3, integration_test from sdk is incompatible with firebase_storage >=7.0.0.
So, because accounting_ca depends on both firebase_storage ^7.0.0 and integration_test any from sdk, version solving failed.
pub get failed (1; So, because accounting_ca depends on both firebase_storage ^7.0.0 and integration_test any from sdk, version solving failed.)
Thanks
In pubspec.yaml remove integration_test.
Before:
dev_dependencies:
flutter_test:
sdk: flutter
integration_test:
sdk: flutter
After:
dev_dependencies:
flutter_test:
sdk: flutter
It should help.
Related
I am trying to add flutter_dialogflow and firebase_storage to my dependencies for a flutter project. But when ever I try to add a recent version of firebase storage to pubspec.yaml file it gives me this error
Because no versions of flutter_dialogflow match >0.1.3 <0.2.0 and flutter_dialogflow 0.1.3 depends on http ^0.12.0+2, flutter_dialogflow ^0.1.3 requires http ^0.12.0+2.
And because firebase_storage_web >=1.0.0 depends on http ^0.13.0, flutter_dialogflow ^0.1.3 is incompatible with firebase_storage_web >=1.0.0.
Because firebase_storage >=10.2.9 <10.2.10 depends on firebase_storage_web ^3.2.10 and firebase_storage >=10.2.10 depends on firebase_storage_web ^3.2.11, firebase_storage >=10.2.9 requires firebase_storage_web ^3.2.10.
Thus, flutter_dialogflow ^0.1.3 is incompatible with firebase_storage >=10.2.9.
So, because flutterbotv2 depends on both flutter_dialogflow ^0.1.3 and firebase_storage ^10.2.9, version solving failed.
pub get failed (1; So, because flutterbotv2 depends on both flutter_dialogflow ^0.1.3 and firebase_storage ^10.2.9, version solving failed.)
To resolve this I had to add a very old version of firebase storage which also gave me this error when I ran pub get in the pubspec.yaml file
The plugin firebase_storage uses a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.
Please does anyone know a way around this problem because I really need both dependencies for a project I'm working on.
This are my dependencies in the pubspec.yaml file
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
flutter_dialogflow: ^0.1.3
hexcolor: ^2.0.6
eva_icons_flutter: ^3.1.0
firebase_core: ^1.14.0
firebase_storage: ^0.3.2
I create a project a little while ago, in Flutter. This week I went back to it and updated the dependencies. Suddenly I'm getting this new error:
Because firebase_core ^0.5.2+1 depends on firebase_core_platform_interface ^2.1.0 and firebase_storage >=7.0.0 <8.0.0-1.0.nullsafety.0 depends on firebase_core_platform_interface ^3.0.1, firebase_core ^0.5.2+1 is incompatible with firebase_storage >=7.0.0 <8.0.0-1.0.nullsafety.0.
So, because [project_name] depends on both firebase_storage ^7.0.0 and firebase_core ^0.5.3, version solving failed.
pub get failed (1; So, because [project_name] depends on both firebase_storage ^7.0.0 and firebase_core ^0.5.3, version solving failed.)
I've searched online and can see that it's a recurring problem that loads of people have faced without any solutions. I'm just hoping someone here has a fix specific to mine. Any help is appreciated. Below is my dependencies section in the pubspec.yaml file.
dependencies:
flutter:
sdk: flutter
getflutter: ^1.0.10
#firebase_auth: ^0.20.1
#cloud_firestore: ^0.16.0
image_picker: ^0.6.3+4
#firebase_storage: ^7.0.0
provider: ^4.0.4
gender_selector: ^1.0.6
gender_selection: "^0.0.8"
flutter_spinkit: "^4.1.2"
place_picker: ^0.9.11
flutter_country_picker: ^0.1.6
multi_image_picker: ^4.6.7
firebase_auth: "^0.18.4+1"
firebase_crashlytics: "^0.4.0"
cloud_firestore: "^0.16.0"
cloud_functions: "^0.9.0"
firebase_storage: "^7.0.0"
firebase_core: ^0.5.3
firebase_database: ^7.1.1
Update your firebase dependencies to the latest version:
dependencies:
flutter:
sdk: flutter
firebase_auth: ^3.3.3
firebase_crashlytics: ^2.4.3
cloud_firestore: ^3.1.4
cloud_functions: ^3.2.3
firebase_storage: ^10.2.3
firebase_core: ^1.10.5
firebase_database: ^9.0.3
I'm not sure what I did to resolve this problem. After changing loads of things and changing the dart SDK to the latest one, it seems to work fine.
Calling dart pub outdated --mode=null-safety and then dart pub upgrade --null-safety to resolve these issues.
Documentation: https://dart.dev/null-safety/migration-guideues
So I have these dependencies which work fine together:
dependencies:
flutter:
sdk: flutter
auto_size_text: ^2.1.0
#Firebase
# cloud_firestore: ^1.0.0
firebase_auth: ^0.18.0+1
google_sign_in: ^4.0.4
provider: ^4.3.2+1
flutter_dialogflow_v2: ^0.3.2
bubble: ^1.2.1
intl: ^0.16.1
material_design_icons_flutter: ^4.0.5955
flutter_spinkit: "^4.1.2"
auth_buttons: ^1.0.1+3
Now if I add cloud_firestore, no matter what version, I get this error:
Because firebase_auth ^0.18.3+1 depends on firebase_core_platform_interface ^2.1.0 and firebase_auth >=0.18.0 <=0.18.3 depends on firebase_core_platform_interface >=2.0.0 <2.1.0, firebase_auth ^0.18.0 requires firebase_core_platform_interface >=2.0.0 <2.1.0 or ^2.1.0.
And because cloud_firestore >=2.1.0 depends on firebase_core_platform_interface ^4.0.1, firebase_auth ^0.18.0 is incompatible with cloud_firestore >=2.1.0.
It seems that the firebase_core_platform_interface is the problem here because two dependencies depend on different versions.
Is there a way of checking the best version mix for this dependency setup?
I can't figure it out.
Set them all to any, 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.
I am creating ChatApp in flutter using firebase. After upgrading flutter SDK with 2.0.1 and all firebase dependencies with the latest versions, I am getting some conflicts.
here is the list of dependencies I am using
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
flutter_launcher_icons: ^0.7.0
data_connection_checker: ^0.3.4
country_pickers: ^1.3.0
image_picker: ^0.6.7+3
cached_network_image: ^2.5.0
url_launcher: ^5.7.0
device_calendar: ^3.1.0
intl: ^0.17.0
firebase_core: ^1.0.0
firebase_analytics: ^7.1.0
firebase_auth: ^1.0.0
cloud_firestore: ^1.0.0
firebase_storage: ^8.0.0
shared_preferences: ^0.5.12
permission_handler: ^5.0.1+1
contacts_service: ^0.4.6
if I use the above versions, I am getting this error on pub get
Because firebase_storage >=8.0.0 depends on firebase_storage_web ^1.0.0 which depends on http ^0.13.0, firebase_storage >=8.0.0 requires http ^0.13.0.
And because cached_network_image >=2.5.0 <3.0.0-nullsafety depends on flutter_cache_manager ^2.1.0 which depends on http ^0.12.0+2, firebase_storage >=8.0.0 is incompatible with cached_network_image >=2.5.0 <3.0.0-nullsafety.
So, because ChatApp depends on both cached_network_image ^2.5.0 and firebase_storage ^8.0.0, version solving failed.
pub get failed (1; So, because ChatApp depends on both cached_network_image ^2.5.0 and firebase_storage ^8.0.0, version solving failed.)
Now I am adding http
http: ^0.13.0
and the error is
Because cached_network_image >=2.5.0 <3.0.0-nullsafety depends on flutter_cache_manager ^2.1.0 which depends on http ^0.12.0+2, cached_network_image >=2.5.0 <3.0.0-nullsafety requires http ^0.12.0+2.
So, because ChatApp depends on both cached_network_image ^2.5.0 and http ^0.13.0, version solving failed.
pub get failed (1; So, because ChatApp depends on both cached_network_image ^2.5.0 and http ^0.13.0, version solving failed.)
if I change cached_network_image to
cached_network_image: ^3.0.0-nullsafety
the error is
Because every version of firebase_analytics_web depends on firebase ^7.3.0 which depends on http >=0.11.3 <0.13.0, every version of firebase_analytics_web requires http >=0.11.3 <0.13.0.
And because firebase_analytics >=7.1.0 depends on firebase_analytics_web ^0.2.0, firebase_analytics >=7.1.0 requires http >=0.11.3 <0.13.0.
So, because ChatApp depends on both firebase_analytics ^7.1.0 and http ^0.13.0, version solving failed.
pub get failed (1; So, because ChatApp depends on both firebase_analytics ^7.1.0 and http ^0.13.0, version solving failed.)
and so on...
does anyone have any idea how to fix this?
Below command analyze dependency version within using packages and suggest 'Resolvable' packges version.
flutter pub outdated
im trying to use:
firebase_auth: ^1.0.0
firebase_auth_oauth: ^1.0.1
when i do this i get this error:
because ui_learn depends on firebase_auth_oauth >=1.0.0 which requires SDK version >=2.12.0 <3.0.0, version solving failed.
pub get failed (1; Because ui_learn depends on firebase_auth_oauth >=1.0.0 which requires SDK version >=2.12.0 <3.0.0, version solving failed.)
exit code 1
so i tried doing this: (pubspec.yaml)
sdk: ">=2.12.0 <3.0.0"
then i got this error:
Because ui_learn requires SDK version >=2.12.0 <3.0.0, version solving failed.
pub get failed (1; Because ui_learn requires SDK version >=2.12.0 <3.0.0, version solving failed.)
exit code 1
this is my flutter & dart version:
flutter version
Flutter 1.26.0-12.0.pre • channel dev • https://github.com/flutter/flutter.git
dart version
dart SDK version: 2.12.0-224.0.dev (dev) (Thu Jan 14 08:05:52 2021 -0800) on "windows_x64"
here is my pubspec file: https://pastebin.com/V5ks0Cb5
does someone know what is wrong?
I was able to make it running with these dependencies:
dependencies:
flutter:
sdk: flutter
android_intent: ^2.0.0
archive: ^2.0.13
cupertino_icons: ^1.0.2
device_apps: ^1.3.0
docx_template: ^0.2.7
firebase_auth: ^1.0.1
firebase_auth_oauth: ^1.0.1
firebase_core: ^1.0.1
flutter_form_builder: ^3.9.0
flutter_native_splash: ^0.3.2
google_fonts: ^2.0.0
path_provider: ^2.0.1
permission_handler: ^6.0.1
signature: ^3.2.1
url_launcher: ^6.0.2
xml: ^4.4.0
dependency_overrides:
intl: ^0.17.0-nullsafety.2
crypto: ^3.0.0
Your flutter version contains a prerelease version of the 2.12 Dart SDK.
Try running flutter upgrade.