About the problem that the project cannot be compiled

 

When we obtain the latest code from the code management server (such as: P4, CVS, SVN), when we are new to the project, we usually encounter the problem that eclipse cannot be compiled. The following is a summary of what I know about this problem. General workaround.

 

1. After obtaining the latest code, make sure that the downloaded new code does not conflict with the local changes. As for how to resolve these conflicts, I won't say more here.

 

2. Quickly compile through the quick compilation instructions provided by the project outside eclipse (usually it can be built through Ant, maven, gradle), usually through this instruction, you can find out the case errors that may exist in the project and the missing Jar package. .

 

3. After the above projects are passed, then re-import the project in eclipse, and eclipse will compile the project.

 

According to the above method, you can usually avoid the situation that the project cannot be compiled and compile errors.

Also if the refresh doesn't work you can do this: Project -> clean or by restarting eclipse.

 

In addition, due to the existence of eclipse itself, when we modify a class, such as adding some print statements, but it is found that the modification does not take effect during execution, we can delete the corresponding class file. And perform the next clean operation.

If eclipse fails to compile due to some systemic failures, you can try to delete the \configuration directory in the local eclipse directory. Note that after deleting this directory, all previous settings for eclipse will be restored to default settings.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326456681&siteId=291194637