Remove the unpleasant "yellow warning" from the Android project. android is not happy.

Source: Internet
Author: User

Remove the unpleasant "yellow warning" from the Android project. android is not happy.

I. Problems

Ii. Solution
  • (1) Right-click the android project and choose Android Tools> Clear Lint Markers.

    This method can clear all warning information in the android project, but unfortunately, the next time you open eclipse, it will continue to prompt, very uncomfortable!

    (2) Use the @ SuppressLint annotation to ignore the specified warning.

    To use this annotation, You need to introduce annotations. jar. By default, this jar package is available when you create a project. Use the following method:

    Add @ SuppressLint ("NewApi") in front of the class, method, and variable. This NewApi is generally a specific class and is automatically added when prompted. Adding annotations can solve this problem without warning, but the code seems to be redundant. In short, there is no way to work in unison. My approach is to let him continue to warn that the program can run normally!

3. Related Links

Http://www.it165.net/pro/html/201307/6563.html

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.