Eclipse - Imported a project and Eclipse is giving me wrong @override method annotation errors

北战南征 提交于 2020-01-15 10:59:33

问题


I imported an Android project and it has a lot of @override method annotations, which Eclipse is complaining about (although the project has worked before and it should not be complaining). I'm using java sdk 1.7. Does anyone know anything about this? Thanks.


回答1:


Are the overrides on interface methods or superclass methods? Interface methods can only be marked with this annotation as of Java 6. What is the compiler compliance level set to for your project? What about for Eclipse in general? If it is not higher than 1.5, you will see such errors. Android officially supports compiler versions 1.5 and 1.6, last I checked.

(Also see the several related questions over there on the right for more details)



来源:https://stackoverflow.com/questions/9439057/eclipse-imported-a-project-and-eclipse-is-giving-me-wrong-override-method-ann

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!