天天看點

【Eclipse 報錯】Project ‘xxx‘ is missing required library

Eclispe報錯:

Project 'xxx' is missing required library: 'D:\Workspaces\javatest\lib\hamcrest-core-1.3.jar'

【Eclipse 報錯】Project ‘xxx‘ is missing required library
原因:

在你項目的build path Library中存在重複并且沖突或者位址引用錯誤的jar包。

解決:
  1. 右擊項目,如下操作:

    Build Path

    Configue Build Path

    【Eclipse 報錯】Project ‘xxx‘ is missing required library

然後将錯誤的jar包移除,并選擇應用和關閉(Apply and Close)。

【Eclipse 報錯】Project ‘xxx‘ is missing required library

此時可能報出其他的錯誤,如下圖所示,這是因為這些調用或聲明使用到了剛剛移除的jar包,此時可以在項目檔案中找到剛剛移除的那幾個jar包,然後将它們加入Library。

【Eclipse 報錯】Project ‘xxx‘ is missing required library
後續解決:
【Eclipse 報錯】Project ‘xxx‘ is missing required library

右鍵如下選擇,根據報錯将所需要的jar包加入 Library。

【Eclipse 報錯】Project ‘xxx‘ is missing required library

以上就解決完了。

如果這篇文章幫助到公子/小主您了,請動動您的小手指,給部落客點個贊吧!江湖生存不易,感謝您的觀看。😊😊😊