Error in Eclipse: "The project cannot be built until build path errors are resolved"

129,408

Solution 1

  1. Identify "project navigator" or "package explorer" view.
    Right click on your project, select Build Path --> Configure build Path.

  2. In the emerging window, you will find four tabs, select "Libraries".There, under "Web app libraries" (expand it), you will see the libraries added to the project's classpath. Check if all of them are available. If one or more are not (they'll have "missing" beside their name and a red mark on their icon), check if you need them (perhaps you don't); if you don't need them, remove it, if you need them, exit this window, look out for the missing jar and IMPORT it into your project.

Solution 2

If you can't find the build path error, sometimes menu ProjectClean... works like a charm.

Solution 3

  1. Open the Problems view. You can open this view by clicking on the small + sign at the left hand bottom corner of eclipse. It's a very tiny plus with a rectangle around it. Click on it and select problems.

  2. The problem view will show you the problems that need to be resolved.

    • If the message says "the project is missing the required libraries...", you need to configure your build path by right clicking on your project, selecting properties, then build path. Add the required jar files using the libraries tab. -If there are other problems other than missing libraries, you need to post the exact problems here to get a precise solution.

Solution 4

In my case, all libraries in the build path were OK.

To solve it, I deleted all project metadata (.project, .classpath, .settings) and re-imported the project as a Maven project.

Share:
129,408
Darkphenom
Author by

Darkphenom

Updated on August 06, 2020

Comments

  • Darkphenom
    Darkphenom almost 4 years

    I am a computer science student learning Java, so I do some work at home and at college on a mixture of Linux and Windows. I have a problem after copying a new project into the Eclipse workspace. The project shows up, but with a red exclamation mark and an error saying:

    The project cannot be built until build path errors are resolved

    How can I fix this? I tried the solution described here, but it didn't work.

  • Darkphenom
    Darkphenom over 11 years
    After step one, I deleted the library with a red 'x' beside it. I then added the default JRE library and then clicked ok. I refreshed the project and it worked. Thanks!
  • Python Cheese
    Python Cheese over 7 years
    When I attempt to open the build path editor, it tells me that there are "No options available" I have the test folder built, but it is not defined as a source folder. When I try to change it with R-click => Source => Format, nothing changes.
  • maverickm
    maverickm over 5 years
    Worked for me. We renamed project in pom.xml and since then it was showing red mark and some prerequisite not being built. Removing project metadata and re-importing project worked. Everything else didn't.