29 December 2005
Resolving spurious project errors in Eclipse
Opening a workspace with several projects, I was presented with the following error for two of the projects:
The project cannot be built until the build path errors are resolved.
The resolution was to force a resave of the selected projects (and their .classpath files):
- Open the project properties
- Select Java Build Path > Libraries
- Add a new, arbitrary library (to be deleted later) > OK
- Wait for the workspace to refresh (or force a refresh of the project)
- The error(s) will go away
- Remove the dummy library
The only other references I could find were to make minor alterations of contents of the .classpath file.
- Bug in ListCookieHandler Java class posted by sstrader on 28 June 2010 at 12:25:24 PM
- A content voting microformat posted by sstrader on 23 April 2010 at 4:34:41 PM
- iPhone, the platform most hated by developers posted by sstrader on 13 April 2010 at 12:25:58 AM
- Singleton for Java posted by sstrader on 5 January 2010 at 11:03:02 PM
- Opera (and Eclipse) posted by sstrader on 25 October 2009 at 10:34:55 AM
Thank you so much!
Posted by: Craig at April 14, 2010 4:46 AMGREAT.!!!
Posted by: Teguh at April 19, 2010 11:06 PMThis has fixed the problem for me, but whenever I clean the project, I have to repeat this. Also I notice that the original post was 2005 and someone has replied a few weeks ago (2010). I'm new to Eclipse and I hope the real reason for this is because I don't yet understand how to configure my android app properly. If this is a problem with Eclipse, is it ever going to be fixed?
Posted by: Philip Beck at May 2, 2010 6:29 AMThis isn't an issue with Eclipse (I don't think) but probably an issue with file visibility or network paths within the project. I rarely encounter this any more, and it's usually because of a missing jar or somesuch change in source control. I.e. if someone else adds a library reference in a class but doesn't add the jar to the classpath.
Check in Project > Properties > Java Build Path > Libraries, to start with.
Posted by: sstrader at May 2, 2010 2:10 PMThank you!
Posted by: Fernando at May 26, 2010 1:46 AMThanks a lot, it works very well
Posted by: Sam at June 8, 2010 7:06 PMSo, 5 years later.....this still hasn't been fixed?!?!? :))
Posted by: Kuz'ma at June 22, 2010 5:48 PMFantastic. Worked a treat.
Posted by: hippy at July 10, 2010 6:44 PMHey, good call on that nice tip; thank you.
Posted by: Clay at July 14, 2010 11:08 PMThanks for pointing that out, I just started my learning and this error really annoyed me, Thanks http://abtevrythng.blogspot.com/
Posted by: heartrobber18 at July 30, 2010 1:49 PMThank you for posting your solution!
Posted by: Gay at August 8, 2010 8:39 AMThis problem also seems to happen when the gen folder gets deleted during a clean. Manually adding the gen folder to your project so that it always exists seems to fix the problem when doing a clean.
Posted by: shawn at August 24, 2010 6:50 AMSo good, thank you.
as said by Kuz'ma, this hasn't been solved for 5 years !?!?!?
Posted by: paimpol at August 29, 2010 11:31 AMgud idea.
Posted by: senthil ,urugan at September 2, 2010 10:21 PM