2012-11-26 55 views
5

我在Eclipse的問題的窗口,上面寫着一個錯誤....添加現有文件夾到Eclipse項目(STS)

The project was not built due to "Error deleting resource 'ProjectName/target/classes/log4j.xml' from the workspace tree." .Fix the problem, then try refreshing this project and building it since it may be inconsistent.

enter image description here

我遇到的問題是文件系統上存在classes/log4j.xml,但我無法導入它。當我前往文件>導入>常規>文件系統並選擇classes/log4j.xml作爲源時,我收到一條消息,說「源位於目標的層級」並且它不讓我完成嚮導。

Can't import screenshot

什麼我需要做的就是這個項目認識到

回答

5

提供目標文件夾,請參閱下From directory

Into folder文本字段,因爲它是空的,Eclipse中認爲,要將log4j.xml添加到同一位置

+0

這是說「源位於目標的層次結構中」。基本上IDE是自相矛盾的,因爲該文件夾沒有顯示在IDE的項目中,但它不會讓我從文件系統導入,因爲它說它已經存在。 – Robert

相關問題