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

后端 未结 23 2680
遥遥无期
遥遥无期 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条回答
  •  旧时难觅i
    2020-12-04 16:47

    To me, the issue was due to wrong imports. In fact, one need to update the imports after adding the v7 support library.

    It can be fixed by doing as follows, for each class of your project:

    1. Delete all the lines with import android.[*], in each class
    2. Reorganize your imports: from the context menu select Source/Organize Imports or (CTRL+SHIFT+O)
    3. When prompted, select the libraries android.support.[*] (and not android.[*]).

提交回复
热议问题