Library Dart Packages has broken classes path

Viewed 5259

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

5 Answers

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

enter image description here

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.

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.

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

This same problem happened to me, it came out right after I changed the "GradleException" to "FileNotFoundException". in build.gradle... there will be a code more or even so:

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
       throw new **FileNotFoundException**("Flutter SDK not found. Set location with flutter.sdk in local.properties file.")
}
Related