ITeye博客

The type XXX cannot be resolved.It is indirectly referenced from required .class

yunnick · 2012-06-07 17:44 · 我的Java · 编程语言 · It is indirectly referenced from required .class · Markdown

编码时遇到编译错误:

The type XXX cannot be resolved.It is indirectly referenced from required .class

 

字面意思就是:某个类无法被解析,因为它在某个.class文件中是间接引用的。

 

原因:我在工程A里引用了另一个工程B,想使用B中的一个构造方法Con(),而这个方法有是继承了B中的某个jar包里的类,所以报的这个错误。

解决方法:将B里的相关jar文件放到A工程里面,问题解决

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。