I have imported a significant industrial project into IntelliJ, but one specific package in one module is having a problem. IntelliJ gives the error "The package name" X "does not match the file path" when opening any class in this package and as a result refuses to recognize the classes as existing when I try to import them elsewhere. It has no problems with other packages at the same level in the module, the folder is visible in the project explorer window on the left, and using "Show in Explorer" happily displays the correct location in the file path. IntelliJ's automatic solution involves setting the path to the file "", assuming that it does not see the folder at all
I can temporarily fix the problem by removing and re-moving the module, but as soon as I restart IntelliJ, the problem will return. It also removes dependencies on this module from others, and about 25 other modules depend on it, it takes a lot of time to read them, so this is not a long-term solution.
I tried using the Invalidate Caches command, without success
source share