I have a problem importing an external project. I go File -> Import... -> Existing Projects into Workspace, choose the folder where the project is located and everything is
The build path should contain the path 'till before' that of the package name.
For eg, if the folder structure is: src/main/java/com/example/dao
If the class containing the import statement'package com.example.dao' complains of the incorrect package error, then, the build path should include:src/main/java
This should solve the issue.