Eclipse 中的 Java Buildpath 问题
在 Eclipse 中,我有一个与我的构建路径相关的错误。
错误:
Project 'XX' is missing required library: 'middlegen-2.1.jar'
但是在构建路径配置之前删除了库。
是不是缓存或者其他方面有问题?
有谁知道为什么 eclipse 说需要该库,即使该库在构建路径配置之前已被删除。
与最佳
In eclipse I have an error related to my build path.
The error:
Project 'XX' is missing required library: 'middlegen-2.1.jar'
But the library is deleted before the build path configuration.
Is there perhaps a problem with cache or so?
Has anyone an idea why eclipse say that the library is required even though the library was deleted before the build path configuration.
With Best
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我猜您已从目录中删除了该库,但尚未更新项目构建路径。右键单击项目名称,选择“属性”,转到“Java 构建路径”,选择“库”选项卡,可以看到您的库不在列表中。如果它仍在该列表中,请使用“删除”按钮将其删除。
I guess you've deleted the library from a directory, but you've not updated the project Build Path. Right click on the project name, select "Properties", go to "Java Build Path", choose the "Libraries" tab, and see that your library is not in the list. If it's still in that list, remove it with the "Remove" button.
此错误可能是由于缺少所需的库或由于 eclipse
解决方案 1
解决方案 2
1.尝试使用菜单->项目->clean 清理项目(选择项目并清理它)
解决方案 3
如果您的构建路径是非常清楚,即没有红色“x”标记则错误可能是 Eclipse 缓存的错误。然后执行以下步骤
1。右键单击项目选择“关闭项目”。
2.项目再次关闭后右键单击项目选择打开项目
此解决方案将清除 eclipse 缓存。
希望任何解决方案都能解决您的问题。
This error is due to probably either missing required library or due to caching of eclipse
Solution 1
Solution 2
1.Try cleaning the project's using Menu->Project->clean (select the projects and clean it)
Solution 3
If your build path is very clear i.e no Red "x" marks then the error could be of eclipse caching.Then do below step
1.Right click on the project choose "close project".
2.Once the project is closed again right click on the project select open project
This solution will clear the eclipse cache.
Hope any of the solution should resolve your problem.
我也遇到了同样的问题,但上述步骤没有帮助。我搜索了 Eclipse 工作区中的文件,发现名为
.markers
和.markers.snap
的文件在.projects 的文件夹下包含错误的路径名
以未构建的项目命名。我退出 Eclipse,备份这些文件,从 Eclipse 工作区中删除它们,然后重新启动 Eclipse。问题就消失了。I had this same problem, but the steps above didn't help. I did a search through files in the Eclipse workspace and found files named
.markers
and.markers.snap
that contained the bad path names under the folders in.projects
that were named for the projects that weren't building. I exited Eclipse, backed up those files, removed them from the Eclipse workspace, and restarted Eclipse. The problem went away.您的项目配置包括对构建路径上的 middlegen-2.1.jar 的引用。该文件丢失了。您可以 a) 将文件放在那里,b) 更改配置以指向另一个位置的文件,或者 c) 删除引用,祈祷项目能够在没有 jar 的情况下编译和运行。
我不知道“库很快被删除”是什么意思,所以如果这对您的问题很重要,您可能需要重新表述。
Your project configuration includes a reference to middlegen-2.1.jar on the build path. That file is missing. You can either a) put the file there, b) change the configuration to point to the file in another location, or c) remove the reference, cross your fingers, and hope the project compiles and runs without the jar.
I don't know what "the library was deleted soon" means, so if that is important to your question, you might want to rephrase.