The hierarchy of the type Classe is inconsistent

2020-04-06 04:05发布

I have a class that implements an abstract class. The abstract class is in another package of my project. Added the package where the class is abstract by Configure build path/Project. In class that implements is accusing the following error: The hierarchy of the type class is inconsistent

Have I to add this package somewhere else?

Thank you!

13条回答
看我几分像从前
2楼-- · 2020-04-06 04:28

I also face this issue in my maven project using with Eclipse oxygen.1a IDE,

The hierarchy of the type MyClassName is inconsistent

Error showing on class name level,

thereafter I took complete svn update from repository and later Maven -> Update Project and later Project Refresh.

The error was gone...

As per my understanding, this were happening due to unmanaged project version.

查看更多
男人必须洒脱
3楼-- · 2020-04-06 04:30

In the Eclipse, OSGi environment, the required package can be added to the MANIFEST.MF-> Dependencies tab -> Imported packages. This will solve the issue. Or the plugin which contains the class can be added to the Required Plugin-ins

查看更多
Luminary・发光体
4楼-- · 2020-04-06 04:32

springframework.aop jar is depends on aopalliance.jar add it to your class path it will resolve ur problm hope it works cos i was facing same prob I added dependent jar so it resolved

查看更多
对你真心纯属浪费
5楼-- · 2020-04-06 04:32
right click your project ,Properties- java build path- source- include all the cs file source(it may inherit the files) and sync.

this worked for me and correctly.

查看更多
霸刀☆藐视天下
6楼-- · 2020-04-06 04:37

Go to the Project Explorer.

  1. Right Click on your Project
  2. Build Path
  3. Configure Build Path
  4. Remove JRE System Library
  5. Click on Add Library
  6. Add JRE System Library
  7. Click on Next and then Finish

The errors will be resolved.

查看更多
倾城 Initia
7楼-- · 2020-04-06 04:37

That means class which implemented by you has reference to the interface or class which again references some other classes or interfaces in other libraries and those are not available.

查看更多
登录 后发表回答