Android tool: Use of Lint and android tool lint

Source: Internet
Author: User

Android tool: Use of Lint and android tool lint

1. Execute: lint -- show AllowBackup // display the description of the AllowBackup topic (issue) in lint in cmd. The execution result is as follows:

AllowBackup-----------Summary: Ensure that allowBackup is explicitly set in the application'smanifestPriority: 3 / 10Severity: WarningCategory: SecurityThe allowBackup attribute determines if an application's data can be baand restored. It is documented athttp://developer.android.com/reference/android/R.attr.html#allowBackupBy default, this flag is set to true. When this flag is set to true,application data can be backed up and restored by the user using adb baand adb restore.This may have security consequences for an application. adb backup allousers who have enabled USB debugging to copy application data off of thdevice. Once backed up, all application data can be read by the user. arestore allows creation of application data from a source specified byuser. Following a restore, applications should not assume that the datapermissions, and directory permissions were created by the applicationitself.Setting allowBackup="false" opts an application out of both backup andrestore.To fix this warning, decide whether your application should support bacand explicitly set android:allowBackup=(true|false)"More information:http://developer.android.com/reference/android/R.attr.html#allowBackup</span>
2. Run lint -- show // in cmd to display the explanations of all topics in lint;

3. Run lint -- help // in cmd to display the help for using lint;


Summary: I am learning about android:AllowBackupSome Lint usage is found along with the attribute meaning. The above is an example, and finding more gold mines depends on you!


Android development: @ SuppressLint (NewApi) What is this?

This is prompted by the lint tool in android. The official lint statement is Improving Your Code with lint, which should help improve the Code. If you do not want to use it, right-click the project, in android tools, select clear lint marker.

What is the lint tool?

PC-Lint is a static analysis tool for C/C ++ software code. You can regard it as a more rigorous compiler. It can not only check common syntax errors, but also identify potential errors that are not easy to detect even if they comply with syntax requirements.
........................
Is an error correction tool.

The following is more detailed information.
..............................
LINT tool is a software quality assurance tool. Many large foreign professional software companies, such as Microsoft
Using it as a program check tool, you must ensure that the LINT check is passed before the program is integrated into the trial version or delivered for testing.
They require software engineers to turn on all compilation switches when using LINT. If you must turn off some switches,
We need to give a legitimate reason to disable these switches.

It can be imagined that if we use LINT to check the program during the first compilation After encoding, and ensure that
Except for all LINT alarms, we will not encounter so many alarms as we do today. Even today, if we can
It is easy to take some effort to eliminate the LINT alarm in the program and maintain the non-alarm status in the future.
The improvement of program quality is self-evident.

PC-LINT is a product of gimpel software, where the content is very extensive and there are 30 options alone
More than 0, involving all aspects of program compilation and syntax usage. This training material aims to guide readers to get started and learn
The basic use of PC-LINT, play a role to attract others, let readers start from here continue to study how to skillfully
Using the various options of PC-LINT enables it to fully serve our development work.

1. Overview
If you want to define the next image point of the LINT tool, it is a more rigorous compiler. It not only supports
Check for common syntax errors as in normal compilers, and check that, although fully compliant with syntax requirements,
But it is likely to be a potential and hard-to-find error.

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.