Phenomenon :
Java:1801:method does not override-a method of the from-its superclass @Override ...
reason :
Eclipse is defaulting to Java 1.5 and your have classes implementing interface methods (which in Java 1.6 can be annotated With @Override, but in Java 1.5 can is applied to methods overriding a superclass method).
That is, the Java 1.5 compiler overrides the parent class's method by default, with @override, but 1.6 has been extended to the method of the interface, so if the compiler for Java 1.5 is compiled, an error occurs.
Solution :
Go to your project/ide preferences and set's Java compiler level to 1.6 and also make sure your select JRE 1.6 to execute Your program from Eclipse.
Java compiler is version 1.6, select the compilation level of 1.6, but the important point is that the build of the Android library is 1.5, the resulting APK program is able to run on the 1.5 core.
Workaround :
Select window–> preferences–> java–> Compiler option 1.6 in Eclipse, and if not, select Compiler Project onfigure in specific s Select Compiler version is 1.6
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.