The project cannot be built until the build path errors are resolved.

前端 未结 20 902
半阙折子戏
半阙折子戏 2020-12-07 11:14

While compiling an android project in eclipse 3.4.2, I am getting The project cannot be built until the build path errors are resolved.

I got a

相关标签:
20条回答
  • 2020-12-07 11:26

    I've seen this problem a few times (got it again right now on my home computer with Eclipse 4.2).

    Forcing a resave (by changing the classpath e.g. by adding a library, save, change-back) works temporarily. But the problem comes back when Eclipse is restarted :(

    Nuking the Eclipse workspace from orbit will permanently fix it (until next time). But there must be a better way!

    0 讨论(0)
  • 2020-12-07 11:27

    This happens when libraries added to the project doesn't have the correct path.

    1. Right click on your project (from package explorer)
    2. Got build path -> configure build path
    3. Select the libraries tab
    4. Fix the path error (give the correct path) by editing jars or classes at fault
    0 讨论(0)
  • 2020-12-07 11:29

    I was getting an additional warning

    The compiler compliance specified is 1.6 but a JRE 1.8 is used
    

    Resolving this warning make the error also go away. The steps are as follows:

    I right-clicked on it, then clicked on Quick Fix. From the dialog that opened I selected Open the Compiler Compliance property page, and clicked the Finish button.

    (This is same as Java Compiler section.)

    In this dialog I found the Compiler compliance level drop down and changed 1.6 to 1.8, and clicked on Apply and close.

    I got a message box Compiler Settings Changed which asked if I wanted to Build the project now?. I clicked on Yes.

    The build path error went away.

    0 讨论(0)
  • 2020-12-07 11:30

    Goto to Project=>Build Automatically . Make sure it is ticked

    0 讨论(0)
  • 2020-12-07 11:33

    Have you tried using Project > Clean... from the menu? This will force a new build on the selected projects in Eclipse.

    0 讨论(0)
  • 2020-12-07 11:34

    On my Mac this is what worked for me

    1. Project > Clean (errors and warnings will remain or increase after this)
    2. Close Eclipse
    3. Reopen Eclipse (errors show momentarily and then disappear, warnings remain)

    You are good to go and can now run your project

    0 讨论(0)
提交回复
热议问题