概述
昨天晚上到今天早上碰到一个让人抓狂的问题。
java error:
The hierachy of the type (ClassName) is inconsistant.
当时的理解是:类层级不一致。这就不叫扯淡了。
在网上搜了很久,第一,解释很少。第二,木有中文版的。
读了好多文档,理解了他们说的大致意思。大致是说比较上层的借口缺失。
这个比较靠谱。
Inconsistent hierarchy
From JavaErrors
Jump to: ,
You can get the error message
The hierarchy of the type Foo is inconsistent
if something in the hierarchy is broken. For example, if you have
WRONG
public abstract class Superclass implements NonExistentInterface { // interface doesn't exist
// stuff
}
public abstract Foo extends Superclass {
// stuff
}
then you will get an error in Foo.java saying that the hierarchy of the type Foo is inconsistent.
This error will also be displayed if your imports are out of sync, perhaps caused by a re-build using an external builder like Ant. To remedy this, hit 'Refresh' (F5) on your Project in Eclipse's Package Explorer.
Another way to get this error in Eclipse is by running an Ant build that instantiates a hierarchy that is really a reference to another project. If the build fails (or was written incorrectly) the hierarchy is not cleaned up. I found I had to go to the Navigator tab (which shows the directories on disk - Windows/Show View/Navigator) and clean things up. Another way to clean it up, if you are running with source control, is to delete the project and bring it back (Thanks Subversion)
看是看懂了,可是这不是很扯淡吗?怎么会有这个问题那?
尝试了好多解决办法,还是木有作用,怎么办?
今天早上我突然想到,是不是自己在项目复制来复制去的时候,丢失了一些字节码,(估计恰好是关于Fragmentg的借口的),才造成了这个问题。于是我把项目删除,重新下载项目导入,哇偶,问题解决了。原来啊就是这个问题。
想了下,这其实还是eclipse的bug。建议eclispe能修复。
(本人比较懒,只帮助程序员解决中文论坛难以解决的问题)
android wp ios 开发。
.net wpf wcf wf winforms asp 开发。
正在寻求“包养“。
联系:
Q:3069217761.
msn:yalei.wang@hotmail.com
最后
以上就是甜美纸飞机为你收集整理的The hierachy of the type (ClassName) is inconsistant.的全部内容,希望文章能够帮你解决The hierachy of the type (ClassName) is inconsistant.所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复