It is indirectly referenced from required .class files(導入項目報錯原因與解決方法)

這幾天導入另一個開發的新項目時,報了個頭疼的錯誤

The project was not built since its build path is incomplete.The type java.util.Arrays cannot be resolved. It is indirectly referenced from required .class files.

顯然不是代碼的問題,都木有找到util包下的內容,就很容易想到是jdk版本問題啦!

通常來說,你應該安裝了幾個版本的jdk。


做個解決方法的筆記:

1.進入windows\preferences\java\Installed JREs

  add--->Standard VM --->next--->接下來就是選擇JRE home,選擇另一個jdk安裝目錄

2.選中報錯的項目,右鍵,properties\Java Build Path

 add library-->JRE System Library -->next -->workspace default JRE--->finish

刷新項目,已經OK啦!


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章