Steps to Reproduce
New flutter project using Flutter beta (1.7.0). Add
hive: ^1.4.1+1
hive_flutter: ^0.3.0+2
hive_generator: ^0.7.0+2 (dev dep)
Run flutter test.
Resolution dependency fails.

Workaround to get tests to run:
Set hive_generator: dependency to be open, and it will resolve to hive_generator: 0.5.2
Version
hive: ^1.4.1+1
hive_flutter: ^0.3.0+2

Same problem here, I'm on different flutter channel.
[√] Flutter (Channel dev, v1.18.0, on Microsoft Windows [Version 10.0.18363.657], locale zh-TW)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Android Studio (version 3.6)
[√] IntelliJ IDEA Community Edition (version 2019.3)
[√] VS Code (version 1.43.2)
[√] Connected device (1 available)
Same problem, can't point to that version after I upgraded Beta
Same problem, can't point to that version after I upgraded Beta
Thumbs up on the original issue so it gets some attention :)
Same problem after I upgraded Beta
@peterlauri @ChivialK @grinder15 @z-dmitri
Try adding dartx in the dev_dependencies section
dev_dependencies:
build_runner:
hive_generator: ^0.7.0+2
dartx:
Then do
sh
flutter packages get && flutter packages upgrade
This should do the trick.
@peterlauri @ChivialK @grinder15 @z-dmitri
Try adding dartx in the dev_dependencies sectiondev_dependencies: build_runner: hive_generator: ^0.7.0+2 dartx:Then do
flutter packages get && flutter packages upgradeThis should do the trick.
Still doesn't work.
@peterlauri @ChivialK @grinder15 @z-dmitri
Try adding dartx in the dev_dependencies sectiondev_dependencies: build_runner: hive_generator: ^0.7.0+2 dartx:Then do
flutter packages get && flutter packages upgradeThis should do the trick.
Still doesn't work.
hmm, looking at my pubspec.lock file it seemed to have gotten the latest version.

It doesn't seem like you use flutter_test @Mravuri96
It doesn't seem like you use
flutter_test@Mravuri96
@Reprevise Probably unsafe, but i upgraded the dartx version within the hive_generator library and pushed it to my fork. Now it works with flutter_test included 🤷♂

I had the same problem. As a temporary solution, I used this:
dependency_overrides:
dartx: ^0.3.0
From this: #203 (comment)
Same problem after I upgraded Beta
Seems like #247 would be a fix for this
I had the same problem. As a temporary solution, I used this:
dependency_overrides: dartx: ^0.3.0From this: #203 (comment)
The workaround is no longer works in the latest flutter beta 1.18.0-11.1.pre. It works in stable channel.
➜ goalplan_flutter git:(scorecard) flutter pub get
Downloading package sky_engine... 0.3s
Downloading flutter_patched_sdk tools... 0.7s
Downloading flutter_patched_sdk_product tools... 0.5s
Downloading darwin-x64 tools... 1.3s
Downloading darwin-x64/font-subset tools... 0.1s
Because no versions of dartx match >0.3.0 <0.4.0 and dartx 0.3.0 depends on path >=1.6.4 <1.7.0, dartx ^0.3.0 requires path >=1.6.4 <1.7.0.
And because every version of flutter_test from sdk depends on path 1.7.0, dartx ^0.3.0 is incompatible with flutter_test from sdk.
So, because goalplan depends on both flutter_test any from sdk and dartx ^0.3.0, version solving failed.
Running "flutter pub get" in goalplan_flutter...
pub get failed (1; So, because goalplan depends on both flutter_test any from sdk and dartx ^0.3.0, version solving failed.)
➜ goalplan_flutter git:(scorecard) flutter doctor -v
Downloading android-arm-profile/darwin-x64 tools... 0.6s
Downloading android-arm-release/darwin-x64 tools... 0.6s
Downloading android-arm64-profile/darwin-x64 tools... 0.4s
Downloading android-arm64-release/darwin-x64 tools... 0.3s
Downloading android-x64-profile/darwin-x64 tools... 0.7s
Downloading android-x64-release/darwin-x64 tools... 0.3s
[✓] Flutter (Channel beta, 1.18.0-11.1.pre, on Mac OS X 10.15.4 19E287, locale en-GB)
• Flutter version 1.18.0-11.1.pre at /Users/plauri/apps/flutter
• Framework revision 2738a1148b (4 days ago), 2020-05-13 15:24:36 -0700
• Engine revision ef9215ceb2
• Dart version 2.9.0 (build 2.9.0-8.2.beta)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/plauri/Library/Android/sdk
• Platform android-29, build-tools 29.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.4.1, Build version 11E503a
• CocoaPods version 1.9.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
[✓] VS Code (version 1.45.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.10.2
[✓] Connected device (3 available)
• iPhone 11 • 37F530C7-353A-49F3-9682-5B91C0B169ED • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-4 (simulator)
• Web Server • web-server • web-javascript • Flutter Tools
• Chrome • chrome • web-javascript • Google Chrome 81.0.4044.138
! Doctor found issues in 1 category.
@peterlauri Maybe using dartx: ^0.4.0 works?
I got this to my email, but cannot find that comment, maybe it was removed. But using path: ^1.6.4 in dependency_overrides worked. But maybe it is not the correct way?

@peterlauri Maybe using
dartx: ^0.4.0works?
This yields the same error, does not resolve the package versions.
To get it to work with flutter beta 1.18.0-11.1.pre I created a fork and branch from the v1.4.1+1 tag in the main repo. Then changed the dependencies for hive_flutter and hive_generator like the below. This works for us, but I cannot guarantee what impact the changes in dependencies have.
hive_flutter:
git:
url: git://github.com/peterlauri/hive.git
ref: v1.4.1+1-flutter-beta-support-1.18.0-11.1.pre
path: hive_flutter
hive_generator:
git:
url: git://github.com/peterlauri/hive.git
ref: v1.4.1+1-flutter-beta-support-1.18.0-11.1.pre
path: hive_generator
@peterlauri The solution you suggested didn't work for me. The Only solution that worked was overridden dependency, Can you look into the problem? thanks
@peterlauri The solution you suggested didn't work for me. The Only solution that worked was overridden dependency, Can you look into the problem? thanks
Sorry, cannot really look into the problem. Are you using latest beta? What are your errors?
I am using flutter version : 1.18.0-11.1pre, latest beta channel.
This is my error :
Running "flutter pub get" in CookingApp...
Because every version of flutter_test from sdk depends on path 1.7.0 and hive_flutter >=0.3.0-dev depends on path >=1.6.0 <1.7.0, flutter_test from sdk is incompatible with hive_flutter >=0.3.0-dev.
So, because CookingApp depends on both hive_flutter ^0.3.0+2 and flutter_test any from sdk, version solving failed.
pub get failed (1; So, because CookingApp depends on both hive_flutter ^0.3.0+2 and flutter_test any from sdk, version solving failed.)
exit code 1
@jaydangar and your pubspec.yaml?
Sorry @peterlauri, I have moved my project to Sembast as I as having difficulty installing HIVE. I have modified the pubspec.yaml now, can't provide you the original content. Hope HIVE will fix this soon and thrive again.
Most helpful comment
I had the same problem. As a temporary solution, I used this:
From this: #203 (comment)