Android Studio lint reports “cannot infer argument types.”

I have reviewed the Inspection report for my project that is provided by Android Studio after having executed the following command:

Analyze->Inspect Code...

The report indicates a problem with this code snippet in my file:

  • android: singleline = true not working for edittext
  • Get info of current visible fragment(s) in android dumpsys
  • Implement Stripe Payment Gateway in Cordova/Phonegap Application
  • How exactly does JVM differ from Dalvik and/or ART?
  • How can I save my android tts output in a wav file?
  • Android Gradle: What is javaMaxHeapSize “4g”?
  • buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
            signingConfig signingConfigs.release

    The specific problem is cannot infer argument types (at line 34). I have included a snapshot for clarity.

    Android Studio lint Inspection complaint

    One SO answer seems to suggest this is just a bogus warning. If that is the case, can I safely suppress this warning?

    Related posts:

    Using getResources() in non-activity class
    Can you autolink dates in android webview
    What is “jobject this” in JNI and what is it used for?
    Disable dark fading in Navigation Drawer
    SVN - how does removing a bin folder cause the src folder to be removed instead?
    AnimatedVectorDrawable does not animate
  • Android statusbar notification launches new app though it running already. How to synchronize launching app from app icon and staus bar notification?
  • Getting a directory file and the ClassLoader for a libGDX Android game
  • What is “reliable write” in BLE?
  • Honeycomb Android emulator is dog slow - will it get manageable before the official release?
  • Zoom action in android using appium-python-client
  • Android and IOS backend framework choice?
  • One Solution collect form web for “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.

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.