我在Eclipse中出现了一个错误。这个错误信息是什么意思:

无法解析iglu.ir.TermVector类型。它是从必需的.class文件中间接引用的


当前回答

当我使用一个新的eclipse版本,并试图使用以前的工作空间,我使用旧的eclipse版本,这个错误发生。

下面是我解决这个问题的方法:

右键单击我的项目在包资源管理器->属性-> Java构建路径-> Libraries ->我看到一个错误(交叉签署)在JRE系统库。因为无法找到路径。->双击JRE System Library ->选择“Workspace Default JRE”选项->完成->确定。->它在工作

FYI.

其他回答

右键单击您的项目->属性->maven->活动maven配置文件(逗号分隔) 然后在该框中写入pom.xml并检查来自工作区项目的解析依赖项

对我来说,当我使用已经使用了很长时间的旧jar集将jdk升级到1.8.0_60时,就会发生这种情况。如果我回到jdk1.7.0_25,所有这些问题都消失了。这似乎是JRE和库之间的兼容性问题。

In my case ,I created a project and made its minSdkVersion=9 and targetSdkVersion=17. I used automatically generated libs/android-support-v4.jar. I also had to make use of ActionBarActivity using android-support-v7-appcomapt.jar. So I just copied the android-support-v7-appcompat.jar file from android-sdk/extras/andrid/support/v7/appcompat/libs folder and pasted it to my project libs folder. And this caused the above error. So basically,I needed to put android-support-v4.jar file from android-sdk/extras/andrid/support/v7/appcompat/libs as well to my project libs folder. As per my knowledge the v7.jar file had dependencies on v4.jar file. So ,it needed it own v4.jarfile,instead of my project,automatically created v4.jar file.

除了前面提到的类文件丢失的原因之外,此错误还可以指示存在重复的类文件,当构建路径上的类文件使用另一个在构建路径中具有多个定义的类时,eclipse将报告此错误。

对我来说,上面的解决方案都没用。 对我来说有用的是选择类中的所有代码,然后将其转换为注释, 保存,然后将其转换回正常文本,错误就消失了。