简体   繁体   English

Eclipse 错误:“无法解析导入工具”

[英]Eclipse error: 'The import utils cannot be resolved'

I'm working on a simple project in Eclipse.我正在 Eclipse 中处理一个简单的项目。 I have an entity class.我有一个实体类。 Now i should instantiate that class and store the object in the database.现在我应该实例化那个类并将对象存储在数据库中。 I have some example projects which use the JpaUtils from the utils package to do this:我有一些示例项目使用 utils 包中的 JpaUtils 来执行此操作:

import utils.JpaUtils;

These projects run without problem.这些项目运行没有问题。 But in my own project I get the error: 'The import utils cannot be resolved'.但是在我自己的项目中,我收到错误消息:“无法解析导入工具”。

I've checked the Build Path and the same libraries are included in my project as in the example projects.我已经检查了构建路径,并且我的项目中包含与示例项目中相同的库。

感谢@KevinHook,通过将Utils 项目添加到Projects菜单中我自己项目的Build Path 解决了问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM