An overview of the 7.1 Androidstudio Code checker tool for Android Studio useful guide

Source: Internet
Author: User

This article is excerpted from the "Android Studio Useful Guide" Author: Bi Xiaobong

Blog: HTTP://BLOG.CSDN.NET/WIRELESSQA

Now the book has been uploaded to Baidu reading, Baidu Search [Anroid Studio useful Guide] will be able to find a book.

Android Studio provides powerful, high-speed, flexible code-checking tools that can detect compiler and execution errors, and advise you to fix and forth them before you compile.

The Android Studio code check not only checks for compilation errors, but also checks out some inefficient code that supports code specifications, programming guides, best practices, and when your code has inaccessible code, unused code, non-localized strings, unresolved methods, Memory leaks even when spelling problems. The Code analysis tools of Android Studio can be checked out at high speed.

The languages currently supported are Android, Java, XML, HTML, and so on.

Android Studio integrates the Code scanning Tool lint, which helps you to identify and correct the structural and quality issues of anroid code very easily, and this book will focus on lint tools.

Code checks are flexible to configure

We can configure the rules for code checking in preferences, enable or disable each code check or more forth its severity, be able to create its own configuration file,

Ability to perform different checks at different ranges. The ability to disallow checks in a particular code snippet, and so on.

This article is excerpted from the "Android Studio Useful Guide" Author: Bi Xiaobong

The most common tasks covered by code checking
    1. to identify possible errors;
    2. Locating dead Code;
    3. Detect performance problems;
    4. Improved maintainability and code structure;
    5. Consistent with coding guidelines and standards;
    6. Compliance with specifications;
How to configure Lint check

By default, when you perform a lint check, all the problems are checked, and of course we are able to configure the lint to check the severity of the problem categories and issues.

We are also able to configure the scope of the lint check:

    • Entire project
    • Each module in a project
    • Each product module in the project
    • Each test module in the project
    • Each open state of the file
    • The structure of each class
    • Each version number controls the range of the system

We are able to configure the lint using these methods:

    • Configuration in Android Studio preferences: 7.14 Configure code review rules

    • Lint.xml file configuration: "7.17 in lint.xml file configuration lint Check"

    • Configuration in Build.gradle file: "7.18 configuring Lint Check in Gradle"

    • Configuring the 7.21 lint Check in Java and XML source code in Java and XML source code

This article is excerpted from the "Android Studio Useful Guide" Author: Bi Xiaobong

Now the book has been uploaded to Baidu reading, Baidu Search [Anroid Studio useful Guide] will be able to find a book.

Public account: WIRELESSQA

Blog: HTTP://BLOG.CSDN.NET/WIRELESSQA

Weibo: HTTP://WEIBO.COM/WIRELESSQA

An overview of the 7.1 Androidstudio Code checker tool for Android Studio useful guide

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.