Inspectopedia Help

Invalid ID declaration

Invalid ID declaration

An id definition must be of the form @+id/yourname. The tools have not rejected strings of the form @+foo/bar in the past, but that was an error, and could lead to tricky errors because of the way the id integers are assigned.

If you really want to have different "scopes" for your id's, use prefixes instead, such as login_button1 and login_button2.

Issue id: InvalidId

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