Firebase-android-sdk: Upgrading Firebase dependencies release reveals the following lint error: NoSuchMethodError:IncompatibleIidVersionDetector.beforeCheckEachProject

Created on 1 Apr 2020  ·  14Comments  ·  Source: firebase/firebase-android-sdk

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs in __the code in this repository__.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:

  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general Firebase discussion, use the firebase-talk
    google group.
  • For help troubleshooting your application that does not fall under one
    of the above categories, reach out to the personalized
    Firebase support channel.

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: 3.6.2
  • Firebase Components/Versions:

    • Firebase Services: 3.6.0

    • Firebase Core: 17.3.0

    • Firebase Message: 20.1.4

    • Firebase Crashlytics: 17.0.0-beta03

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

Updated all the firebase dependencies last night only to receive the following lint error:

Execution failed for task ':app:lintDebug'.
> Lint found errors in the project; aborting build.

  Fix the issues identified by lint, or add the following to your build script to proceed with errors:
  ...
  android {
      lintOptions {
          abortOnError false
      }
  }
  ...

  Errors found:

  /Users/amanda.hinchman-dominguez/Documents/repos/47deg/scaladaysandroidkotlin/app: Error: Unexpected failure during lint analysis (this is a bug in lint or one of the libraries it depends on)

  Message: 'com.android.builder.model.AndroidProject com.android.tools.lint.detector.api.Project.getGradleProjectModel()'

  The crash seems to involve the detector com.google.firebase.installations.lint.IncompatibleIidVersionDetector.
  You can try disabling it with something like this:
      android {
          lintOptions {
              disable "IncompatibleIidVersion"
          }
      }

  Stack: NoSuchMethodError:IncompatibleIidVersionDetector.beforeCheckEachProject(IncompatibleIidVersionDetector.kt:56)←LintDriver.checkProject(LintDriver.kt:894)←LintDriver.analyze(LintDriver.kt:422)←LintCliClient.run(LintCliClient.java:238)←LintGradleClient.run(LintGradleClient.java:261)←LintGradleExecution.runLint(LintGradleExecution.java:305)←LintGradleExecution.lintSingleVariant(LintGradleExecution.java:392)←LintGradleExecution.analyze(LintGradleExecution.java:94)

I did some digging of my own - the library jars downloaded in com.google.firebase.installations appears to be missing the package for lint let alone the class itself. Furthermore, there appears to be no such class in documentation or release notes.

However, I did spot two recent commits made in roughly the last 2 weeks involving the existence of com.google.firebase.installations.lint.IncompatibleIidVersionDetector:

Relevant Code:

Insert the following dependencies in an Android project:

dependencies {
    def firebase_version = '17.3.0'

    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation "androidx.multidex:multidex:2.0.1"
    implementation 'androidx.core:core-ktx:1.2.0'

    implementation "com.google.firebase:firebase-core:$firebase_version"
    implementation 'com.google.firebase:firebase-messaging:20.1.4'
    implementation "com.google.firebase:firebase-analytics:$firebase_version"
    implementation 'com.google.firebase:firebase-crashlytics:17.0.0-beta03'
}
bug

Most helpful comment

@crossle We are working on the release right now and hopefully it will be available today. If we face any process related delays I will update this thread. Thanks for your patience

All 14 comments

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

Sorry for the inconvenience!

The error you are describing is a new LINT check that is incompatible with Gradle/AGP v3.6+.
We are getting a hotfix ready as soon as possible.
We are hoping to get it on April 1 or April 2 at the latest.

If they're using Gradle/AGP < v3.6 you should not be affected by this issue!

Sorry! I didn't see that another similar issue had also been filed - but I hope some of this information is useful

Thank you @andirayo! I really appreciate the workaround. I'll be sure to keep an eye on this issue - but until then, there is no major rush for this fix on my end!

Hi, have the same issue. Unfortunately that broken lint check is part of BOM (Bill of Materials) artifact.

For now I disabled that check with

android {
    lintOptions {
        disable "IncompatibleIidVersion"
    }
}

as is suggested with error output.

1409 contains a fix for this issue.

When release ?

@crossle We are working on the release right now and hopefully it will be available today. If we face any process related delays I will update this thread. Thanks for your patience

Could the update be published?

Hi, we are working on publishing it asap, it should be out later today.

Should be launched now.

Not sure if related, but I just updated all of my firebase libraries, and I get the following lint error:

Error: Incompatible IID version found in variant devDebug: com.google.firebase:firebase-iid:20.0.2.

I updated:

analytics 17.2.2 -> 17.3.0
messaging 20.1.0 -> 20.1.5
perf 19.0.5 -> 19.0.6

Using AGP 4.0 Beta 4

We are facing same issue as well with all lates updated firebase libraries, Using AGP 3.6.2

Same here, using:

  • AGP 3.6.3
  • analytics 17.3.0

Error: Incompatible IID version found in variant xyz: com.google.firebase:firebase-iid:20.0.2. To resolve this issue, consider updating the build file to the latest firebase-iid version. [IncompatibleIidVersion]

Was this page helpful?
0 / 5 - 0 ratings