Android Studio lint reports "cannot infer argument types." Android Studio lint reports "cannot infer argument types." android android

Android Studio lint reports "cannot infer argument types."


You can (very likely) safely ignore this warning. The IntelliJ (Android Studio) Groovy inspection is decent, but far from perfect. I have several advanced Gradle build scripts that are riddled with these and other inspection errors, although everything runs correctly. However, there is a chance you make a programming error and the inspection is technically correct, but you'll find that out once you attempt to execute your build script.

For this particular warning, you can turn it off on a by-line basis by using

//noinspection GroovyAssignabilityCheck

You can also turn it off entirely by going to File > Settings > Inspections and type Incompatible type assignments in the filter box and uncheck that inspection option. There you can also configure all the Groovy inspection options if you want to turn off others as well.