Android error-remove '@ override' annotation error and import project compilation error with jar package or so package

Source: Internet
Author: User

1. Remove '@ override' annotation Error

After a new project is imported, the "remove '@ override' annotation" error may occur because before jdk1.6, "@ override" only works for super class, but added support for interfaces after 1.6, therefore, if the imported project is based on jdk1.5, this problem may occur.

Solution: Set the compiler in eclipse to JDK 1.6.

① Project-properties-Java compiler-select 1.6

② Window-preferences-Java-compiler-select 1.6

2. An error occurred while importing a project with a jar package or so file.

Dragged down from gitCodeAfter importing eclipse, all problems seem to have been solved, but errors occurred when compiling to the mobile phone, and no errors were displayed in the code. It has been a long time problem, A closer look at the original libs directory contains jar packages and so library files, but all jar packages and so library files are actually under the armeabi directory, so the solution is: import the jar files in the armeabi directory to the libs (armeabi is in the libs directory) directory. It seems that only the library files can be put under armeabi, so that compilation is okay.

In addition, you need to note that if the project displays a red exclamation mark, one of the solutions is: project-build path-configure build path-libraries-delete the so file except the jar package (the project can only import jar files, not so files ), then, clean the project.

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.