After downloading an open source project from GitHub and importing it into eclipse, I encountered this annoying error message: the declared package “com. Sap. Smartservice” does not match the expected package “main. Java. Com. Sap. Smartservice”
This is my project file directory:
Solution: right click the project and select properties – > Build path, found SRC folder is set to build path.
First, right-click SRC folder and select remove from build path to remove it from build path:
Then select the Java folder under Src/main, set it to build path, and restart Eclipse:
Error disappears:
to get more original articles of Jerry, please pay attention to the official account of “Wang Zixi”: