Android – Build path incomplete only in some workspaces (Android)

androideclipse

I have multiple Eclipse (3.52 "Galileo") ) workspaces so that I can keep related projects together in the same workspace. I switch between them with File > Switch Workspace.

I recently copied a good, working project to a different workspace, did a "File > Import" to import it in its new workspace, but after doing a Clean and Build, got the "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 " error.

All my other projects build fine. I thought the "build path" referred to the search path Java or SDK files, so why would it only fail on one project ( …a project that builds fine in a different workspace, at that)?

I've tried restarting eclipse, switching back and forth between workspaces, doing another clean and build, but no luck. Any ideas? Thanks in advance.

Best Answer

This may be a little late to help you, but in case others are looking, here's how I fixed it:

Right click on your project and select ‘Properties’. Then select ‘Java Build Path’, and the Library tab. Look for a JVM. If one is not there (broken link from your copied project), click ‘Add Library’ and add the default JVM. If a VM is there, select it and hit ‘Edit’ and reselect the default JVM. This should reestablish that link and fix the problem. Hope this helps.