Question

Using Android Studio version 4.0.

I'm trying to clean up all of the inspection errors, But I can't find how to get rid of the checks that are being made on the R.java file.

enter image description here

I did try to Exclude it from the scope of the check, but then the inspection gets stuck because it relies on it for references.

How do I remove it than?

Thanks in advance.

Was it helpful?

Solution

Android Studio incorrectly does inspections on generated code in the build folder, which is the behavior you're seeing. This was filed as this bug against Android Studio: https://code.google.com/p/android/issues/detail?id=64651 which you can read and see some extended commentary. It's actually a bug in the underlying IntelliJ base, not anything specific to Android Studio. The best place to track it seems to be this bug: http://youtrack.jetbrains.com/issue/IDEA-119399

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top