Reputation: 225
I'm having a bit of a problem with my project. my firebase dependencies cannot be updated.
This is my pubspec.yaml file
name: customimageclassifier
description: Crowdsource data for ML models
version: 1.0.4
environment:
sdk: ">=2.2.2 <3.0.0"
dependencies:
flutter:
sdk: flutter
cloud_firestore: ^0.9.13
camera: 0.5.0
path_provider: ^1.6.27
transparent_image: ^1.0.0
google_sign_in: ^4.5.9
http: ^0.12.2
timeago: ^2.0.30
scoped_model: ^1.1.0
image_picker: ^0.6.7+22
intro_slider: ^2.3.4
url_launcher: ^5.7.10
shared_preferences: ^0.5.12+4
cupertino_icons: ^0.1.2
dev_dependencies:
flutter_test:
sdk: flutter
automl_mlkit:
path: ../automl_mlkit/
firebase_auth:
path: ../firebase_auth/
firebase_storage:
path: ../firebase_storage/
firebase_messaging:
path: ../firebase_messaging/
flutter:
uses-material-design: true
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
assets:
- assets/labels.txt
- assets/mobilenet_v1_1.0_224.tflite
- images/
This is the result I got when I ran pub get
Running "flutter pub get" in flutter-app...
Because every version of firebase_storage from path depends on firebase_core ^0.3.0 and cloud_firestore >=0.16.0 <0.17.0-1.0.nullsafety.0 depends on firebase_core ^0.7.0, firebase_storage from path is incompatible with cloud_firestore >=0.16.0 <0.17.0-1.0.nullsafety.0.
So, because customimageclassifier depends on both cloud_firestore ^0.16.0+1 and firebase_storage from path, version solving failed.
pub get failed (1; So, because customimageclassifier depends on both cloud_firestore ^0.16.0+1 and firebase_storage from path, version solving failed.)
Process finished with exit code 1
I got the source code for this project form https://github.com/FirebaseExtended/mlkit-custom-image-classifier
Any help is appreciated.
Upvotes: 0
Views: 49
Reputation: 591
Thats happened because you have some packages depends on firebase_core different versions.
you need to use dependency_overrides
like this:
dependencies:
flutter:
sdk: flutter
cloud_firestore: ^0.9.13
...
dependency_overrides:
firebase_core: ^0.7.0
Upvotes: 1