I have a file with compilation errors in Android Studio module. Excluding this file from the gradle build causes the project compile successfully, but I still have red marks on the file (and as a consequence on the whole project), which is a bit annoying and confusing.
Is there any way to disable errors highlighting in Android Studio for files that are excluded from the gradle build?