Eclipse compilation error: The hierarchy of the type 'Class name' is inconsistent

后端 未结 23 2641
遥遥无期
遥遥无期 2020-12-04 15:53

I have downloaded some open source software written in Java and tried to compile it using Eclipse. I got the error: \"The hierarchy of the type \'Class name\' is inc

23条回答
  •  南方客
    南方客 (楼主)
    2020-12-04 16:48

    Error : the hierarchy of the type "class name" is inconsistent error.

    solution : class OtherDepJar {} --> is inside "other.dep.jar" .

    class DepJar extends OtherDepJar {} --> is inside "dep.jar".

    class ProblematicClass extends DepJar {} --> is inside current project .

    If dep.jar is in the project's classpath, but other.dep.jar isn't in the project's classpath, Eclipse will show the" The hierarchy of the type ... is inconsistent error"

提交回复
热议问题