Conflict in installing the latest version of Hive

Asked

Viewed 84 times

1


EDIT
Has been corrected as per : https://github.com/hivedb/hive/issues/337

This issue is fixed with v1.4.2 update.
1.4.2 -  Fixed dependency issues and minor improvements

dependencies:
  hive: ^1.4.1+1

dev_dependencies:
  hive_generator: ^0.7.0+2

Because hive_generator >=0.6.0 depends on dartx 0.2.0 which depends on quiver >=2.0.3 <2.1.0, hive_generator >=0.6.0 requires quiver >=2.0.3 <2.1.0. And because Every version of flutter_test from sdk depends on quiver 2.1.3, hive_generator >=0.6.0 is incompatible with flutter_test from sdk.

So, because app_teste depends on Both flutter_test any from sdk and hive_generator 0.7.0+2, version solving failed. pub get failed (1; So, because app_teste depends on Both flutter_test any from sdk and hive_generator 0.7.0+2, version solving failed.)

Usually when this kind of conflict occurs I can update the version by pubspec.yamml, but this time I do not know how to solve because from what I understood in the error would have to update flutter_test.

From what I saw flutter_test not updated with a normal package.

How to resolve this conflict?

2 answers

2


You need to override the dependency by placing the code below in your pubspec.yaml.

dependency_overrides:
  dartx: ^0.4.1

There are open tasks on this issue, and a beta branch, which will solve the problem when the Release is released. For now you can keep this stretch in your pubspec.yaml.

Task Link on Github

  • 2

    Most places I found said to use a version that doesn’t solve, or override a bunch of packages that still conflict with flutter_test. This answer solved 100% for me. I was surprised to find the answer in stackoverflow in Portuguese. Not to belittle us Portuguese speakers, but as a developer we are used to finding everything in English. Vote up with pride :)

  • Thanks so much @rneves! I’m happy to help.

0


EDIT
In accordance with : https://github.com/hivedb/hive/issues/337

This issue is fixed with v1.4.2 update.
1.4.2 -  Fixed dependency issues and minor improvements

An alternative is to fork

dependency_overrides:
  hive:
    git:
      url: git://github.com/seuusuariogit/hive.git
      path: hive
  hive_generator:
    git:
      url: git://github.com/seuusuariogit/hive.git
      path: hive_generator

Browser other questions tagged

You are not signed in. Login or sign up in order to post.