Another "The project was not built because its build path is incomplete"

I have an Android project that I happily built for weeks at Eclipse Indigo. I did not change any settings, libraries or workspace components, nor did I add or delete files . A few hours ago, I did โ€œRun Fromโ€ to launch my application on the phone, and Eclipse was very hung up. I could not even kill him in the task manager, so I rebooted my computer.

Now, when I try to create my application, I get "The project was not created because its build path is incomplete. Cannot find the class file for java.lang.Object. Correct the build path, then try to create this project"

I removed gen and made clean and built with the same result. In the Properties for Build Path project, the Libraries tab displays

  • Android dependencies
  • Android private libraries
  • Unable to get the system library for the project.

Any idea what is going on? This Eclipse error โ€œthe build path is incompleteโ€ is very common, but when I look at Qaru and Google, most of the cases seem to involve importing new projects, moving workspaces, changing libraries, or other things that I did not do.

Thanks in advance!

+4
source share
5 answers

I fixed my problem.

I made File> Switch Workspace and switched to another workspace in which there was another project. Then I switched to my original workspace, and everything was fine.

Thus, we can add this to a long list of very folk remedies, nostrums, stories of old wives, superstitions and other bits of software that accompany various strange bugs that affect Eclipse. I'm sure Android Studio will be better than this!

+14
source

This worked for me:

Open Project Properties> Java Build Path> Libraries. Select "Cannot get system library ..."> "Delete"> "OK." Open libraries again> Add library> "Container for Android classes"> "Next"> "Finish"> "OK".

+1
source

The following worked for me, so I thought I would share.

Restarting Eclipse and encountered the same problem. To restore my project, it again took the following.

  • Right-click the project inside the Package Explorer and select properties.
  • Go to the Java build path.
  • Click "TAB Library"
  • Delete the line that says "Unable to get the system library for the project", select ok.
  • Then right-click on the project and select "Android Tools" โ†’ "Fix Project Properties".

Hope this helps ... An eclipse can sometimes be a real PITA.

BTW I "watched" any changes after deleting and fixing, and it looks like it is removed from .classpath, and then "Fix Project Properties" adds the line back. After that, clear + Build.

+1
source

The solution was to force the selected projects (and their .classpath files) to be saved:

Open the project properties Select "Java build path"> "Libraries" Add a new, custom library (to delete it later)> OK Wait for the workspace to update (or force the project to be updated) Error disappears Delete the dummy library

0
source

Try Project -> Clean. Also make sure "Build Automatically" is checked

-3
source

Source: https://habr.com/ru/post/1499485/


All Articles