imported module does not work in new package
已回答
I want to use stdlib in intellij, and I imported the module through the dependency tab in the project structure. I am able to use the classes in stdlib under the src folder in my project. However, if I create a new package in that same src folder, the classes within that new package don't recognize classes from stdlib, saying "cannot resolve symbol". Any insight on why this is the case?
请先登录再写评论。
There was a similar report when stdlib classes were in the default package. You can't import classes that reside in the default package because of the Java limitation.
See https://intellij-support.jetbrains.com/hc/en-us/community/posts/207703065-How-to-use-stdlib-jar-in-Intellij-Idea- for the solutions.