天天看點

The project was not built due to "Could not delete ''.". Fix the problem, then try refreshing this p錯誤原因解決方案2017-08-31更新

Eclipse修改完Java類檔案儲存之後,項目上出現了錯誤提示,如圖:

The project was not built due to "Could not delete ''.". Fix the problem, then try refreshing this p錯誤原因解決方案2017-08-31更新

但是項目的檔案都沒有提示錯誤,

打開Problems視窗會看到具體的錯誤資訊:

The project was not built due to “Could not delete ”.”. Fix the problem, then try refreshing this project and building it since it may be inconsistent SimpleMetadataReaderTest Unknown Java Problem

如圖:

項目生成的目标目錄在資料總管中打開了,生成時需要清理目錄,由于檔案夾打開了無法删除,是以導緻些錯誤。

關閉對應的檔案夾就可以了。

有不少朋友回報,看了之後還是不知道怎麼辦,這裡再說的詳細一點。

1、最簡單粗暴一點的解決方法,關閉你打開的所有檔案夾,然後重新整理項目試試!

2、上面指出“打開Problems視窗會看到具體的錯誤資訊”,那麼錯誤資訊中會顯示對應的目錄,如果你打開的很多檔案夾視窗還有用,就找到錯誤資訊中提示的目錄視窗将其關閉就可以了。

3、怎麼關閉?

Windows系統:關閉資料總管

Linux系統:關閉檔案浏覽器

macOS系統:關閉Finder

4、如果還是不能解決問題,有可能是目錄被其它程式占用,檢查起來比較麻煩,重新開機電腦吧。