I have a Java/Maven project in intellij with the following file structure :
And the following line get me the error " Package name 'test.java.princ' does not correspond to the file path 'princ'"
In fact, it does this with every files in my project.
What I've tried :
- Rebuilding with maven
- Deleting project and importing it again
- Unmarking src/resources folder and marking them again
- supervision.iml has the correct folders as src and resources
Building works fine, with intellij or mvn command.
CodePudding user response:
you should not need the main.java just do package princ... for example: Model.test for this project layout: Project Structure. this gives me no errors.