您的位置:首页 > 其它

idea @Override is not allowed when implementing interface method

2017-10-23 14:34 507 查看
近期研究idea,在编码过程发现报错:@Override is not allowed when implementing interface method 。找到一个老外的回答,感觉挺有用的,记录下来,以供参考:
1、在project/module上,右键选择菜单“Open Module Settings” ;
2、选择Modules,修改“Language Level” 为 “8-Lambdas,......”;
3、选择Project, 修改“Project language level” 为 “SDK default”。
4、保存,重启。

我的本地是 maven 管理的项目, 所以在  pom.xml 中添加 

[html] view
plain copy

<plugin>  

                <groupId>org.apache.maven.plugins</groupId>  

                <artifactId>maven-compiler-plugin</artifactId>  

                <version>3.2</version>  

                <configuration>  

                    <source>1.6</source>  

                    <target>1.6</target>  

                </configuration>  

            </plugin>  



就搞定了! 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: