Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yet Another 'The project was not built since its build path is incomplete'

I have an Android project that I've been happily building for weeks in Eclipse Indigo. I have not changed any settings, libraries, or workspace components, or added or removed any files. A few hours ago I was doing a "Run as" to run my app on a phone and Eclipse did a hard hang. I couldn't even kill it in Task Manager so I rebooted my PC.

Now when I try to build my app I get "The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project"

I deleted gen and did a clean and build with the same result. In the project Properties for the build path, in the Libraries tab it shows

  • Android Dependencies
  • Android Private Libraries
  • Unable to get system library for the project.

Any idea what's going on? This Eclipse "build path is incomplete" error is very common but when I search Stack Overflow and Google, most of the cases seem to be related to importing new projects, moving workspaces, changing libraries or other things I didn't do.

Thanks in advance!

like image 721
user316117 Avatar asked Dec 11 '22 11:12

user316117


2 Answers

I fixed my problem.

I did a File>Switch Workspace and switched to another workspace that had a different project in it. Then I switched back to my original workspace and everything was fine.

So we can add this to the very long list of folk-remedies, nostrums, old-wives-tales, superstitions and other bits of software lore that accompany the various weird bugs that afflict Eclipse. I sure hope Android Studio turns out to be better than this!

like image 152
user316117 Avatar answered Dec 21 '22 09:12

user316117


This worked for me:

Open project properties > Java Build Path > Libraries. Select "Unable to get system library..." > Remove > OK. Open Libraries again > Add Library > "Android Classpath Container" > Next > Finish > OK.

like image 35
Old Jack Avatar answered Dec 21 '22 10:12

Old Jack