'Facing 'Internal error: Unexpected lint invalid arguments' while upgrading gradle plugin and gradle version to 7.0.2

Task :lintVitalAnalyzePlaystoreRelease FAILED
Could not deserialize /build/intermediates/incremental/lintVitalAnalyzePlaystoreRelease to a lint model: java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserException

The lintOptions defined in gradle is as below

    lintOptions {
        abortOnError true
        checkReleaseBuilds true
        lintConfig file("lint.xml")
        disable "ExportedService", "GradleCompatible", "InflateParams", "InconsistentLayout", "UselessParent",
            "LabelFor", "ContentDescription", "MissingQuantity", "MissingTranslation", "ImpliedQuantity",
            "InvalidPackage", "UnusedAttribute", "UniquePermission", "ClickableViewAccessibility", "Range"

    }

I have also increased my compileSdk version to 31. Kotlin version is 1.5.20.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source