@Override is not allowed when implementing interface method

这个问题我是第一次遇见:@Override is not allowed when implementing interface method。不过这个错误提示信息描述得这么短,再难也不是一个大问题,我理解的大意是:当实现这个接口方法时重载是不允许的。

首先我相信我的代码肯定没问题,因为我实现的接口确实有这个方法。在编程阶段就提示这个错误,于是我有理由相信应该是编译错误!通过google,解决办法so easy:

File-->Project Structure...-->Module-->选中模型-->Language Level,如图:

参考来源:http://stackoverflow.com/questions/15402615/override-is-not-allowed-when-implementing-interface-method

原文地址:https://www.cnblogs.com/exmyth/p/6139565.html