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”:
Similar Posts:
- taskdef class org.apache.catalina.ant.InstallTask cannot be found
- Using PSCP to copy data from Windows computer to SSH in Linux_ Init error
- The solution of the import javax.servlet cannot be resolved in Java
- Eclipse C/C++ Error: launch failed,binary not found
- Python learning notes – Import utils error
- Eclipseeditor does not contain a main type
- git schnnel failed to receive handshake, SSLTLS connection failed
- Solve the error reported by eclipse project: unbound classpath container
- [Solved] Eclipse Error: Access restriction: The type ‘BASE64Decoder’ is not API
- JAVA8 Access restriction: The type ‘Application’ is not API (restriction on required lib