Android Lint Tools is a static code tool that comes with Android Studio, Android Lint is a custom check rule specifically for Android, so you can check out many of the Android-specific code flaws. It is recommended that during the development process, it is a good time to regularly check the code for problems and to run lint before each test function module.
Android Studio itself integrates Android Lint, right-click on any of the one by one folders in the project, select Analyze→inspect Code in the pop-up menu ... You can perform a lint check.
The check results are as follows:
We can open one of them.
Here it's suggested that you can change a member variable to a local variable.
In addition, we can also customize the code hints for Android lint. The operation is as follows:
Depending on your needs, you can increase or decrease the severity level of some kind of hint appropriately.
Android lint--code optimization tool embedded in Android studio