The hierarchy of the type is inconsistent problem solving

Source of the problem: Because I am related to two projects (1 project, 2 project), 1 project needs to use the 2 project’s class (class realization a jar package), and then realize this problem;

No matter how you check, I don’t know where the error is, because there is no problem when the jar package of the 2 project is not used; this problem occurs after using it;

This problem is called inconsistent class types in the jar package;

Solution: need to correct the jars of the two projects. If all the packages in the 2 projects have been imported, you can find the jars of the imported classes in the error reporting class of the 1 project and import them into the 1 project again; the problem can be solved

 

Similar Posts: