Reputation: 193
Here's my pubspec.yaml
:
version: 1.0.0+1
environment:
sdk: ">=2.3.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
shared_preferences: ^0.5.7+2
hive: ^1.4.1+1
hive_flutter: ^0.3.0+2
path: ^1.6.4
cupertino_icons: ^0.1.2
firebase_core: ^0.4.4+3
firebase_auth: ^0.15.5+3
cloud_firestore: ^0.13.4+2
cloud_functions: ^0.4.2+3
dev_dependencies:
hive_generator: ^0.7.0+2
build_runner: ^1.10.0
flutter_test:
sdk: flutter
flutter:
assets:
- assets/images/
uses-material-design: true
And, here is the error message:
Because every version of flutter_test from sdk depends on quiver 2.1.3 and dartx ^0.2.0 depends on quiver >=2.0.3 <2.1.0, flutter_test from sdk is incompatible with dartx ^0.2.0. And because hive_generator
=0.6.0 depends on dartx ^0.2.0, flutter_test from sdk is incompatible with hive_generator >=0.6.0. So, because callshield depends on both hive_generator ^0.7.0+2 and flutter_test any from sdk, version solving failed. pub get failed (1; So, because callshield depends on both hive_generator ^0.7.0+2 and flutter_test any from sdk, version solving failed.)
Removing hive_generator
will allow pub get to not error. I don't know my way around pubspec and the dependencies to solve this. Is there a way to add hive_generator
to my current configuration? Would switching to beta channel help?
My current environment:
Upvotes: 4
Views: 3202
Reputation: 4418
Add lines below to your pubspec.yaml
file and it works for me:
dependency_overrides:
dartx: ^0.3.0
Upvotes: 7
Reputation: 3469
I was facing the similar issue, I have just override dartx
and path dependency and it works like a charm. My pubspec.yaml
look like this after overriding the dependencies:
dependencies:
flutter:
sdk: flutter
dio: ^3.0.9
hive: ^1.4.1+1
hive_flutter: ^0.3.0+1
cupertino_icons: ^0.1.3
dependency_overrides:
dartx: ^0.3.0
path: ^1.7.0
dev_dependencies:
flutter_test:
sdk: flutter
hive_generator: ^0.7.0+2
build_runner: ^1.10.0
Hope it helps. The Overriding Dependency is the Temporary Solution Recommended by The Author himself here
Upvotes: 0