Intellij not recognizing module reference

Answered

I have added a module to my project, properly referenced the module, and then rebuilt the entire project. Still when I attempt to add the import to this new module to my existing module. It doesn't recognize the reference. I have spent quite a bit of time on this and can find no answers. Any help is appreciated.

4 comments
Comment actions Permalink

Could you please prepare and provide a small sample project illustrating the problem and the exact steps to reproduce (complete zipped source tree and project files)?

0
Comment actions Permalink

Forum doesn't support non-image attaches. You can either share it via Dropbox or similar service or submit a ticket to support. Another way is to use our upload form: https://intellij-support.jetbrains.com/hc/en-us/articles/206869619-Uploading-Large-Files-for-JetBrains-Support-Team.

0
Comment actions Permalink

Import statement in your code (import main.java.two;) is invalid. It specifies the package instead of the classes to import.

If you want to import all the classes from the package, use this:

import main.java.two.*;

If you want to import just one class, use this:

import main.java.two.Test2;

Screenshot:

Read http://www.leepoint.net/language/10basics/import.html.

0

Please sign in to leave a comment.