Inspectopedia Help

Non-constant resource ID in a switch statement

Validates using resource IDs in a switch statement in Android library module.

Resource IDs are non final in the library projects since SDK tools r14, means that the library code cannot treat these IDs as constants.

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for Android 2023.3, Qodana for JVM 2023.3

Plugin:

Android, 2022.3.1 Beta 2

Last modified: 13 July 2023