'Library Dart Packages has broken classes path

The Flutter project seems that the cache doesn't exist or what. and it can't 'fit' in fact. Someone who can do me a favor. thanks As below: enter image description here

enter image description here



Solution 1:[1]

This is what fixed it for me. : "Remove Invalid Roots" in the Project Structure -> Problems

enter image description here

Solution 2:[2]

Try dart pub cache repair. If you have an older dart install, just "pub cache repair", but be sure to break yourself of that habit soon.

Solution 3:[3]

I experienced this error. It was caused by cache folders lacking a lib folder. In my case, the folders were ios specific and did not contain a lib folder inside. I simply added an empty lib folder to resolve.

Solution 4:[4]

There is a package break your Android build if it or its dependencies aren't compatible with AndroidX. See AndroidX Migration for more information on the problem and how to fix it.

or

It may be due to the version of the package, so you may need to change the version only image of issue

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 HanDoJin
Solution 2 Randal Schwartz
Solution 3 JasonP
Solution 4 Apps Maker