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
- to identify possible errors;
- Locating dead Code;
- Detect performance problems;
- Improved maintainability and code structure;
- Consistent with coding guidelines and standards;
- 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