# Automating Code Analysis in Android Projects

DevFeed: [Automating Code Analysis in Android Projects](<https://devfeed.tech/articles/automating-analyzing-of-code-in-android-projects-25963.md>)

Original publisher: [Read original article](<https://proandroiddev.com/automating-analyzing-of-code-in-android-projects-a60313569c53?source=rss-7a0a233f88a2------2>)

Author: Kirill Rozov

Published: 2021-09-20T18:11:42Z

Content type: tutorial

Language: en

Sources: [Stories by Kirill Rozov on Medium](<https://devfeed.tech/sources/stories-by-kirill-rozov-on-medium.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Static code analysis](<https://devfeed.tech/topics/static-code-analysis.md>), [Code](<https://devfeed.tech/topics/code.md>), [Java](<https://devfeed.tech/topics/java.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [ci](<https://devfeed.tech/topics/ci.md>), [ide](<https://devfeed.tech/topics/ide.md>)

Tags: [also](<https://devfeed.tech/tags/also.md>), [android](<https://devfeed.tech/tags/android.md>), [ci](<https://devfeed.tech/tags/ci.md>), [code](<https://devfeed.tech/tags/code.md>), [code-analysis](<https://devfeed.tech/tags/code-analysis.md>), [code-quality](<https://devfeed.tech/tags/code-quality.md>), [code-quality-tools](<https://devfeed.tech/tags/code-quality-tools.md>), [development](<https://devfeed.tech/tags/development.md>), [ide](<https://devfeed.tech/tags/ide.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>)

## AI overview

This tutorial explains how to automate code analysis in Android projects. It distinguishes static analysis, which can run during development or in CI, from dynamic analysis, which runs the application to detect issues such as memory leaks. It also introduces IDE inspections as a code-analysis tool.

## Source excerpt

Source unsplash.com/photos/Tjbk79TARiEAutomation of code analysis in Android projectsHello. My name is Kirill Rozov, and if you are interested in Android development, then most likely you have heard about the Android ResId Telegram channel with daily news for Android developers.https://medium.com/media/ff8acd16dd7b4b03a485bf9baab3c9d6/href Modern mobile applications are already quite serious enterprise projects that are developed by hundreds of developers, contain thousands of lines of code and are constantly changing and developing. The process of automating code checking and application work helps to deal with such a huge codebase. Today I will tell you what tools you can use to improve the stability of your project and avoid mistakes, as well as save time for colleagues during a pull request. Are you developing a project with a small team or alone? Then this article is even more important to you, since you most likely didn't configure any checks for yourself, and I will tell you why this needs to be done. Types of code checking Code analyzers is divided on two types: static code analysis (without starting the application) code analysis while the application is running Android development uses statically typed compiled languages: Java and Kotlin. These are important requirements for languages that allow them to analyze code without having to run it, and they can do it right at the time of writing the code. This type of analysis is called static. This makes it easy to run analyzing on any CI and automate checking for simple errors, such as not closing a stream after reading/writing code. The disadvantage of such checks is that if your code deviates from the template embedded in it, then the code will not work or will work incorrectly. Also, such analyzers can't understand complex code execution scenarios and their effect. More serious checks of your code can be done by automatically analyzing it while the application is running (dynamic). For example, you can tra