When I used CVS again today, all the team members met "This
Compilation
Unit
Is
Not
On
The
Build
Path
Of
A
Java
Project
"This error.
This error occurs when the check out project is complete automatically using the "." operation.
Some Baidu + Google did not find a solution. However, the problem has been locked and then stored in the Eclipse project description file (. Project under the project root directory
File ).
So I re-created two projects (assume Project
, Project B), in
Add a class file to the project. Project B remains unchanged. Then
"Copy the file to
Project, overwrite
Project
"File.
At this time
When writing code in the project, you will encounter "This
Compilation
Unit
Is
Not
On
The
Build
Path
Of
A
Java
Project
"This error.
However, the. Project
File is not found any different. However, errors may occur in eclipse.
Now we have found the cause of the problem. But how can we solve this problem.
The following describes my solutions:
1. Delete the project on the local machine [before deleting, make sure all files have been submitted to the Code server].
2. Import the project from the CVS server: file-> Import Project
-> Select a project under CVs.
From CVS-> next... (follow the wizard instructions to import the project ).
3. OK ~~ Open the project you just imported. The problem is solved !!! ^_^...
Happy, how can we avoid this mistake in the future?
The CVS server is built on my computer. I checked the project deployed in CVs and found that there is a. Project under the project directory.
File.
At this point, the developer finally knows who is the culprit. The developer checked out the wrong. Project.
File causes this error.
So the method to avoid this error is obvious, not to go to the. Project on the checkout server.
File (not tested, only personal inference, specific analysis is required ).
Turn: http://witcheryne.javaeye.com/blog/318653