'Flutter - Overridden dependencies
After running "flutter pub get", I got this error:
Warning: You are using these overridden dependencies:
! path 1.6.4
Solution 1:[1]
That's not an issue. That happens because you (or any other transitive dependency) may be overriding some dependency that you are already using. For example, if you are using path: 0.X.X
and some other dependency use dependency_overrides
to make sure that is using path: 1.6.4
, it will present you that message.
Overall, you shouldn't have to worry with that and sometimes it is actually required in order to some dependencies work all together.
Solution 2:[2]
Please give more details so that i can answer it better. Attach your pubspec.yaml.
But now i can tell you some methods which should work.. first of all see if you are using the latest version of all dependencies or not then:
try:
- restarting your ide
flutter clean
if these two don't work then at last try
flutter pub cache repair
Solution 3:[3]
I encountered the same error after cloning a flutter repository. I initially mistook the error for being a build issue when it's just a warning that won't stop your app from running.
I solved the build issue I was having with the freshly cloned project by running this command inside the app's root directory: flutter pub run build_runner build
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Miguel Ruivo |
Solution 2 | Tshilidzi Mudau |
Solution 3 |