无法读取 Eclipse 分面项目元数据文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23517308/
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 faceted project metadata file could not be read
提问by David
Every now and then, I get this error in one of my Eclipse projects:
我时不时地在我的 Eclipse 项目之一中收到此错误:
Faceted project metadata file "/project/.settings/org.eclipse.wst.common.project.facet.core.xml" could not be read.
无法读取分面项目元数据文件“/project/.settings/org.eclipse.wst.common.project.facet.core.xml”。
This is a team project using Git. The ".settings" directory does not exist at all.
这是一个使用 Git 的团队项目。“.settings”目录根本不存在。
I'm not sure what project "facets" in Eclipse really are. Does anyone know what this error means or how to fix it?
我不确定 Eclipse 中的项目“方面”到底是什么。有谁知道这个错误意味着什么或如何解决它?
采纳答案by David
I resolved it this time by re-importing the Maven project. This recreated the .settings directory and eliminated the error.
这次我通过重新导入Maven项目解决了它。这重新创建了 .settings 目录并消除了错误。
回答by Uva
Right click the project in eclipse and go to Project Facets and change the java or the corresponding Project Facets to the version that it was developed.
在 eclipse 中右键单击项目并转到 Project Facets 并将 java 或相应的 Project Facets 更改为它开发的版本。
Right click the project folder --> Properties --> Project Facets --> Change java version or tick the required module choosing the version.
右键单击项目文件夹 --> 属性 --> Project Facets --> 更改 java 版本或勾选所需的模块选择版本。
回答by Diddi
I resolved it this time with Right click --> Project --> Properties --> Target Runtimes --> tick the required runtime. In my case no runtime was selected.
这次我通过右键单击 --> 项目 --> 属性 --> 目标运行时 --> 勾选所需的运行时解决了这个问题。在我的情况下,没有选择运行时。
回答by Gilad Baruchian
not sure why it even looks for facets in my case since i don't use it, was solved for me by going to project facets, ticking one facet and then apply then removing the facet then apply again
不知道为什么它甚至在我的情况下寻找刻面,因为我不使用它,通过去投影刻面,勾选一个刻面然后应用然后删除刻面然后再次应用为我解决了
回答by James Drinkard
To add to the other answers, I had this issue when I renamed a project, then deleted it from the eclipse workspace, then named it back and imported it back into my workspace to fix another issue I was having.
要添加到其他答案中,当我重命名一个项目时遇到了这个问题,然后将它从 eclipse 工作区中删除,然后将其重新命名并将其重新导入到我的工作区中以解决我遇到的另一个问题。
It was an Angularjs project. I had to select the javascript and Static Web Module facets and that solved the problem.
这是一个 Angularjs 项目。我必须选择 javascript 和静态 Web 模块方面,这解决了问题。
Follow the same procedure: right click on the project -- properties -- project facets.
遵循相同的过程:右键单击项目--属性--项目构面。
回答by darkhorse21
In Spring Tool Suite v3.9.0.RELEASE you can fix this error by doing the following:
在 Spring Tool Suite v3.9.0.RELEASE 中,您可以通过执行以下操作来修复此错误:
Right-click on project --> Spring Tools --> Enable Spring Aspects Tooling
右键单击项目 --> Spring Tools --> Enable Spring Aspects Tooling
回答by MarkA
I have just had the same problem - caused in my case by attempting to revert local changes through SVN.
我刚刚遇到了同样的问题 - 在我的情况下是由于尝试通过 SVN 恢复本地更改而导致的。
I was able to resolve within Eclipse by right clicking a project, select Maven, select Update Project, and Select Allprojects.
我可以在 Eclipse 中通过右键单击一个项目,选择Maven,选择Update Project和Select All项目来解决。
This avoided having to reimport any code, and work smoothly for all sub-projects.
这避免了必须重新导入任何代码,并为所有子项目顺利工作。
Hope this helps!
希望这可以帮助!