hive icon indicating copy to clipboard operation
hive copied to clipboard

Getting error "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." after addeing hive_flutter: ^0.3.0+2

Open artmelkonyan opened this issue 6 years ago • 17 comments

Steps to Reproduce Added in pubspec.yaml dependencies: hive: ^1.4.1+1 hive_flutter: ^0.3.0+2

dev_dependencies: hive_generator: ^0.7.0+2 build_runner: ^1.10.0

and run

flutter pub get

get error

Running "flutter pub get" in aebinfo...                         
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.

Version

  • Platform: iOS, Android, Mac, Windows, Linux, Web
 Flutter (Channel master, 1.19.0-2.0.pre.71, on Microsoft Windows [Version 10.0.18363.778], locale en-US)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Chrome - develop for the web
[!] Android Studio (version 3.5)
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code (version 1.45.1)
[√] Connected device (3 available)

! Doctor found issues in 1 category.

artmelkonyan avatar May 15 '20 14:05 artmelkonyan

I got the same error after updating flutter.

Safort avatar May 16 '20 08:05 Safort

me too, can't use pub get

NauzetAduen avatar May 16 '20 18:05 NauzetAduen

same here.

ToruNagao avatar May 17 '20 00:05 ToruNagao

same here

sgehrman avatar May 17 '20 05:05 sgehrman

Duplicate of #285.

Temporary fix: Add the following to your pubspec.yaml:

dependency_overrides:
  path: 1.7.0

MarcelGarus avatar May 17 '20 10:05 MarcelGarus

Duplicate of #285.

Temporary fix: Add the following to your pubspec.yaml:

dependency_overrides:
  path: 1.7.0

Ok thanks it solve my issue

artmelkonyan avatar May 17 '20 15:05 artmelkonyan

Solved my too! Thanks!

EagleSigma avatar Jun 06 '20 18:06 EagleSigma

Mine is not solved. Where to put this:

dependency_overrides:
  path: 1.7.0

YazeedAlKhalaf avatar Jul 12 '20 15:07 YazeedAlKhalaf

Hive installation is confusing & harder. if I override path version then it shows version error in dartx, if I override its version then it shows version error in characters. still, version issue is not cleared. please update the version of packages used in hive

anandsubbu007 avatar Jul 19 '20 08:07 anandsubbu007

Mine is not solved. Where to put this:

dependency_overrides:
  path: 1.7.0

Below dependicies in pubspec.yaml file

dependencies:
  flutter:
    sdk: flutter

dependency_overrides:
  path: 1.7.0

ghost avatar Jul 22 '20 06:07 ghost

It's still a problem. Need a solid fix.

ashishbairwa avatar Aug 26 '20 07:08 ashishbairwa

It's still a problem. Need a solid fix.

Could you write exact error message here? The issue was fixed after hive is updated a month ago.

themisir avatar Aug 26 '20 07:08 themisir

I got the same ERROR and solved by the following steps

  • I used older version it was [flutter_launcher_icons: "^0.7.0"]

  • I wrote the following code in the same file [pubspec.yaml] but changed 2 values (android value and image path) flutter_icons: android: true >>> it was "launcher_icon" but I changed it to true ios: true image_path: "my image path"

  • In terminal I wrote the following codes flutter pub get then press ENTER flutter pub run flutter_launcher_icons:main then press ENTER flutter run then press ENTER

These steps solved my issue, i hope it helps you too< GOOD LUCK

https://pub.dev/packages/flutter_launcher_icons/versions/0.7.0 Capture

islamyoussef avatar Oct 03 '20 16:10 islamyoussef

dependency_overrides: path: 1.7.0

I got this message depends on dependency_overrides any which doesn't exist (could not find package dependency_overrides at https://pub.dartlang.org), version solving failed.

yoonjiyong avatar Nov 25 '20 01:11 yoonjiyong

using path: ^1.7.0 instead of path: 1.7.0 Worked for me

dependencies:
  flutter:
    sdk: flutter

dependency_overrides:
  path: ^1.7.0

AliEasy avatar Dec 30 '20 13:12 AliEasy

flutter channel stable flutter upgrade flutter clean

Worked for me. Good luck!

leedre avatar Jan 28 '21 21:01 leedre

Have you checked this article

pratikbutani avatar Mar 13 '21 12:03 pratikbutani