Android Lint Checks check for unused resources

Source: Internet
Author: User

Today, a group of Android Developers asked: how to find unused resource files? My answer: Android
Lint checks. Kids shoes are confused. I didn't know it had this feature. In fact, Android lint checks can not only check which image XML files are referenced, but also check whether the layout is reasonable and the layout is localized, and provide modification suggestions.
It can be easily used in eclipse. 1. Android is checked in green.
Lint checks.

Figure 1
In addition, right-click the project and choose
You can also find it in tools and click Run Lint: check for common Errors.

Figure 2


Run Android
After Lint Checks, related Warnings, categories, modification suggestions, and so on will be displayed in the Lint Warnings window. 3.

Next, we will take modification internationalization as an example to explain how to quickly modify according to the suggestions provided by Android Lint Checks, expand the entries starting with [i18n], and click one of them to enter a certain xml, press ctrl + 1 and the following dialog box will pop up. Click Extract String to display it in strings. create a new string wizard in xml and follow the wizard.

Sometimes the project requirements change greatly and the interface is often modified, resulting in a large amount of unused resource files.

After using Android Lint Checks, for example, none of those with yellow warnings

Use Android Lint Checks to make your application more robust
Post: http://www.eoeandroid.com/thread-205314-1-1.html

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.