package naming in intellij vs eclipse
Answered
Hi All,
My company use, eclipse by default for our project. But I tried to use Intellij. So after importing the project.
package com.sample1.sample2.sample3; // i am getting error in intellij as package name does not correspond to file path.
whereas same package com.sample1.sample2.sample3; // is working in my eclipse.
Please help me to find a solution.
Please sign in to leave a comment.
Hello Sssaishiva,
Please describe in steps how you imported the project into IntelliJ IDEA.
It should be done according to our official guide: https://www.jetbrains.com/help/idea/import-project-from-eclipse-page-1.html
Also, share with us a screenshot of the project structure or a sample project to reproduce the issue.
You can use FTP or HTTPS for that (Do not forget to specify the file names).
As a general troubleshooting solution try to perform:
(File | Invalidate Caches / Restart...)Please also check that the source roots are configured correctly. Source root should be set to the default package directory (the one above the com directory). See https://www.jetbrains.com/help/idea/configuring-content-roots.html for details.