且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

The project was not built due to "Could not delete ''.". Fix the problem, then try refreshing this p

更新时间:2022-09-02 12:28:49

版权声明:本文为 testcs_dn(微wx笑) 原创文章,非商用***转载-保持署名-注明出处,谢谢。 https://blog.csdn.net/testcs_dn/article/details/45935015

Eclipse修改完Java类文件保存之后,项目上出现了错误提示,如图:
The project was not built due to "Could not delete ''.". Fix the problem, then try refreshing this p
但是项目的文件都没有提示错误,
打开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
如图:
The project was not built due to "Could not delete ''.". Fix the problem, then try refreshing this p

错误原因

项目生成的目标目录在资源管理器中打开了,生成时需要清理目录,由于文件夹打开了无法删除,所以导致些错误。

解决方案

关闭对应的文件夹就可以了。

2017-08-31更新

有不少朋友反馈,看了之后还是不知道怎么办,这里再说的详细一点。
1、最简单粗暴一点的解决方法,关闭你打开的所有文件夹,然后刷新项目试试!
2、上面指出“打开Problems窗口会看到具体的错误信息”,那么错误信息中会显示对应的目录,如果你打开的很多文件夹窗口还有用,就找到错误信息中提示的目录窗口将其关闭就可以了。
3、怎么关闭?

  • Windows系统:关闭资源管理器
  • Linux系统:关闭文件浏览器
  • macOS系统:关闭Finder

4、如果还是不能解决问题,有可能是目录被其它程序占用,检查起来比较麻烦,重启电脑吧。