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.
- Some thoughts on Ruby after finishing a week (minus one day) of training posted by sstrader on 15 December 2011 at 8:59:30 PM
- Links on the singleton pattern posted by sstrader on 9 December 2011 at 9:19:50 AM
- Phonebot posted by sstrader on 29 October 2011 at 6:37:05 PM
- The labeled break in Java posted by sstrader on 4 September 2011 at 11:27:56 AM
- Recent code project posted by sstrader on 1 July 2011 at 7:33:06 PM
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 PMI can not resolve it, why?
Posted by: iDan at October 14, 2010 7:46 AMThank you very very very much!!!! the only solution for this problem on all the internet!!
Posted by: Carlos at November 4, 2010 4:01 PMThanks a bunch, you made my day :)
Posted by: Don at January 3, 2011 9:10 AMThank you so much, saved me a lot of time!
Posted by: Francesco LMU Monaco at January 13, 2011 12:33 PMBrilliant - thanks!
Posted by: Jamie Lemon at May 19, 2011 12:07 PMThanks for sharing this :o)
It was kind of driving me crazy...
This fixed my problem! Thanks for that! :)
Posted by: John at June 21, 2011 3:51 AMExcellent fix ... just added the JUnit library to the projects and we're golden. I'm looking forward to see how long it maintains itself.
Posted by: Dirck at June 26, 2011 6:31 PMThank you! Saved me from losing the rest of my hair!!
Posted by: John at April 17, 2012 12:44 PM