Eclipse error: indirectly referenced from required

2019-01-02 23:32发布

I got an error in Eclipse. What does this error message means:

The type iglu.ir.TermVector cannot be resolved. It is indirectly referenced from required .class files

标签: eclipse
20条回答
姐就是有狂的资本
2楼-- · 2019-01-02 23:51

I got this exception because eclipse was working in a different version of jdk, just changed to the correct, clean and build and worked!

查看更多
姐就是有狂的资本
3楼-- · 2019-01-02 23:53

This is as likely a matter of Eclipse's getting confused as it is an actual error. I ignored the error and ran the web service whose endpointInterface it complained about, and it ran fine, except for having to deal with the dialog every time I wanted to run it. Just another opaque error that tells me nothing.

查看更多
家丑人穷心不美
4楼-- · 2019-01-02 23:53

It sounds like this has been a known issue (Bug 67414)that was resolved in 3.0 ... someone has commented that it's occurring for them in 3.4 as well.

In the mean time, the work around is to remove the JRE System Library from the project and then add it back again.

Here are the steps:

Go to properties of project with the build error (right click > Properties)

View the "Libraries" tab in the "Build Path" section

Find the "JRE System Library" in the list (if this is missing then this error message is not an eclipse bug but a mis-configured project)

Remove the "JRE System Library"

Hit "Add Library ...", Select "JRE System Library" and add the appropriate JRE for the project (eg. 'Workspace default JRE')

Hit "Finish" in the library selection and "OK" in the project properties and then wait for the re-build of the project

Hopefully the error will be resolved ...

查看更多
来,给爷笑一个
5楼-- · 2019-01-02 23:53

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.

查看更多
闹够了就滚
6楼-- · 2019-01-02 23:55

This error occurs when the classes in the jar file does not follow the same structure as of the folder structure of the jar..

e.g. if you class file has package com.test.exam and the classes.jar created out of this class file has structure test.exam... error will be thrown. You need to correct the package structure of your classes.jar and then include it in ecplipse build path...

查看更多
SAY GOODBYE
7楼-- · 2019-01-02 23:56

This happened to me because of transitive dependencies in my jars

查看更多
登录 后发表回答