Suppress "Identifier not allowed in Android" Suppress "Identifier not allowed in Android" android android

Suppress "Identifier not allowed in Android"


Based on wnc_21 answer I found that it can be disabled for a specific scope, in my case it's only used in tests so there's that.

Android Studio disable inspection for tests scope


I am not sure if you can do it in code, but you can at least disable it in the IDE. Go to "File | Settings | Editor | Inspections | Illegal Android Identifier" and disable this inspection.


Use:

@file:Suppress("IllegalIdentifier")

on the top of the file