Reputation: 8281
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
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!
Upvotes: 4
Views: 22068
Reputation: 841
The following worked for me, so I thought I would share.
Restarted Eclipse and ran into the same problem. Did the following to get my project to build again.
Hope this helps.... eclipse can be a real PITA sometimes.
BTW I "watched" for any changes after the delete and fix, and it looks like Is removed from .classpath, and then the "Fix Project Properties" adds the line right back. Clean + Build works after that.
Upvotes: 1
Reputation: 1
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
Upvotes: 0
Reputation: 21
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.
Upvotes: 1
Reputation: 8281
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!
Upvotes: 14