Java @override Error Resolution

Source: Internet
Author: User

@overide error after importing project in Eclipse

After entering the project, all the @override reported the following error:

Multiple markers at the
-The method GetCount () of type new Baseadapter () {} must override a superclass method


Recently imported Android project in Eclipse, will report @override error, so all the @overide to delete, and later as the import of the project increased, manual removal is troublesome, So check the Internet: The reason for the @overide error is because the Java compiler version is incorrect, java 1.5 compiler defaults to the method of the parent class overrides, with @override to explain, but 1.6,1.7 has been extended to the interface method; 1.5 compiler to compile, there will be an error.

Modify: Select window–> preferences–> java–> Compiler Select 1.6 or 1.7 in eclipse, and if not, select Compiler Project onfigure in Specifi C Settings Select the compiler version is 1.6 or 1.7, after setting, before the error project right-click android Tools > Fix project Properties, you will no longer error.

Java @override Error Resolution

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.