Android-Specific Debugging

Most Android debugging is just like Kotlin debugging. However, you will sometimes run into issues with Android-specific parts, such as resources, that the Kotlin compiler knows nothing about. In this section, you will learn about two kinds of Android-specific issues: Android Lint issues and issues with the R class.

Using Android Lint

Android Lint (or just “Lint”) is a static analyzer for Android code. A static analyzer is a program that examines your code to find defects without running it. Lint uses its knowledge of the Android frameworks to look deeper into your code and find problems that the compiler cannot. In many cases, Lint’s advice is worth taking.

In Chapter 7, you will see Lint warn you ...

Get Android Programming: The Big Nerd Ranch Guide, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.