Eclipse:无法构建项目
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6992870/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse: Unable to build the project
提问by Anshuman Sharma
The project was not built due to "Resource already exists on disk: ''.". Fix the problem, then try refreshing this project and building it since it may be inconsistent
由于“磁盘上已存在资源:''。”,该项目未构建。解决问题,然后尝试刷新此项目并构建它,因为它可能不一致
I am getting above error whenever I am trying to build the project. Earlier the project was running fine, but all of sudden it stopped running and giving this error.
每当我尝试构建项目时,我都会遇到上述错误。早些时候该项目运行良好,但突然间它停止运行并出现此错误。
Eclipse version: Eclipse Java EE IDE for Web Developers. Helios Service Release 1 JRE: jdk1.5.0_22
Eclipse 版本:面向 Web 开发人员的 Eclipse Java EE IDE。Helios 服务版本 1 JRE:jdk1.5.0_22
回答by Nivas
- Try refreshing the project, clean and rebuild.
- Right click on the error, click "Quick Fix" if this is enabled.
- Right click on the error, click "Properties" for the details. Try to delete the resource in question from outside eclipse, refresh, clean and build.
- 尝试刷新项目,清理并重建。
- 右键单击错误,如果已启用,请单击“快速修复”。
- 右键单击错误,单击“属性”查看详细信息。尝试从 eclipse 外部删除有问题的资源,刷新、清理和构建。
回答by saneryee
- Exit Eclipse.
- Delete all the java class files (These files located in /bin or like that).
- Open Eclipse and wait a minute. The project will be rebuilt by Eclipse(auto).
- 退出日食。
- 删除所有 java 类文件(这些文件位于 /bin 或类似文件中)。
- 打开 Eclipse 并稍等片刻。该项目将由 Eclipse(auto) 重建。
回答by n4rzul
I had to go to ST_SAMI\web\WEB-INF\classesand delete EVERYTHINGunder the directory in question. Refreshed and cleaned project and all was well again.
我不得不去ST_SAMI \网络\ WEB-INF \类和删除一切有问题的目录下。刷新和清理项目,一切都很好。
Version: Helios Release (Also J2EE release for web developers)
Build id: 20100617-1415
版本:Helios 版本(也是面向 Web 开发人员的 J2EE 版本)版本号
:20100617-1415
回答by iceberg
Project right click --> Build Path --> Configure Build Path and you have seen Project source paths.And attention please,
项目右键--> 构建路径--> 配置构建路径,你已经看到了项目源路径。请注意,
If you have more than one source, you should probably encountered this problem. You should examine each source.
如果您有多个来源,您可能会遇到这个问题。您应该检查每个来源。
Source click --> edit --> next --> and you seen exclusion patterns and inclusion patterns.
源单击--> 编辑--> 下一个--> 您会看到排除模式和包含模式。
For example, your directory path
例如,您的目录路径
source
|
\------ExDir
|
\------IncDir
You must select for inclusion only IncDir and select for Exclusion only ExcDir
您必须选择仅包含 IncDir 并选择仅排除 ExcDir
- If you select for exclusion source Directory you encounter this problem.
- 如果您选择排除源目录,则会遇到此问题。