Found class xxx.xxx.xxx, but interface was expected
Posted jimmyfan
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Found class xxx.xxx.xxx, but interface was expected相关的知识,希望对你有一定的参考价值。
Found class xxx.xxx.xxx, but interface was expected
项目中日志进行升级,原来的日志是自己封装的,分为
-
Log - 接口
-
LogImpl - Log接口的实现
-
LogFactory - Log的工厂类
升级后同事嫌麻烦,直接将Log改成实现类。变成:
-
Log - Log实现
-
LogFactory - Log的工厂类
然后运行时,抛出异常:java.lang.IncompatibleClassChangeError: Found class xxx.xxx.xxx.Log, but interface was expected
解决方法:
-
代码全部重新编译
-
还是用接口-实现的方式
以上是关于Found class xxx.xxx.xxx, but interface was expected的主要内容,如果未能解决你的问题,请参考以下文章
Plugin with id ‘maven‘ not found或者Plugin [id: ‘maven‘] was not found in any of the following sources
armubuntu mate apt-get 404 not found