Code analysis
Code analysis tools, such as Android Lint, can help you detect potential bugs and how your app can be optimized for security, usability, and performance.
Android Lint comes with Android Studio, but there are also other tools available such as: Check Style, Project Mess Detector (PMD), and Find Bugs. In this recipe, we will only have a look at Android Lint.
Getting ready
Most ideally, you would have completed the first two recipes of this chapter, so we will now examine the results of the app. However, you can use
Android Lint
(or another tool) on any project to see where things can be improved.
Note
The support annotations of the first recipe influence the results being displayed. Yes, that is right, we cause these warnings.
How to do it...
There is nothing that we need to install in order to get an Android Lint report, as it is already in there with Android Studio. Just follow the next steps to make use of it:
Open the project you have created in the previous recipes. Or, alternatively...