Eclipse - 导入了一个项目,Eclipse 给了我错误的 @override 方法注释错误 [英] Eclipse - Imported a project and Eclipse is giving me wrong @override method annotation errors

查看:40
本文介绍了Eclipse - 导入了一个项目,Eclipse 给了我错误的 @override 方法注释错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我导入了一个 Android 项目,它有很多 @override 方法注释,这是 Eclipse 所抱怨的(尽管该项目之前已经运行过,它不应该抱怨).我正在使用 java sdk 1.7.有人对这个有了解吗?谢谢.

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.

推荐答案

是接口方法还是超类方法的覆盖?从 Java 6 开始,接口方法只能使用此注释进行标记.为您的项目设置的编译器合规性级别是多少?一般来说,Eclipse 怎么样?如果不高于 1.5,您将看到此类错误.Android 官方支持编译器版本 1.5 和 1.6,上次我查了一下.

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)

这篇关于Eclipse - 导入了一个项目,Eclipse 给了我错误的 @override 方法注释错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆