Inspectopedia Help

'import android.R' statement

'import android.R' statement

Importing android.R is usually not intentional; it sometimes happens when you use an IDE and ask it to automatically add imports at a time when your project's R class it not present.

Once the import is there you might get a lot of "confusing" error messages because of course the fields available on android.R are not the ones you'd expect from just looking at your own R class.

Issue id: SuspiciousImport

Inspection Details

Available in:

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


Android, 2022.3.1 Beta 2

Last modified: 13 July 2023