question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning: Lint found an issue registry...which did not specify the Lint API version it was compiled with.

See original GitHub issue

Description:

After upgrading from 1.1.0 to 1.2.0, I receive this lint warning:

> Task :app:lintDebug
/Users/westy92/.gradle/caches/transforms-2/files-2.1/374e2f90329bb1eac35cc77543028c25/jetified-annotation-experimental-1.0.0/jars/lint.jar: Warning: Lint found an issue registry (androidx.annotation.experimental.lint.ExperimentalIssueRegistry) which did not specify the Lint API version it was compiled with.

This means that the lint checks are likely not compatible.

If you are the author of this lint check, make your lint IssueRegistry class contain
  override val api: Int = com.android.tools.lint.detector.api.CURRENT_API
or from Java,
  @Override public int getApi() { return com.android.tools.lint.detector.api.ApiKt.CURRENT_API; }

If you are just using lint checks from a third party library you have no control over, you can disable these lint checks (if they misbehave) like this:

    android {
        lintOptions {
            disable "UnsafeExperimentalUsageError",
                    "UnsafeExperimentalUsageWarning"
        }
    }
 [ObsoleteLintCustomCheck]

   Explanation for issues of type "ObsoleteLintCustomCheck":
   Lint can be extended with "custom checks": additional checks implemented by
   developers and libraries to for example enforce specific API usages
   required by a library or a company coding style guideline.

   The Lint APIs are not yet stable, so these checks may either cause a
   performance degradation, or stop working, or provide wrong results.

   This warning flags custom lint checks that are found to be using obsolete
   APIs and will need to be updated to run in the current lint environment.

   It may also flag issues found to be using a newer version of the API,
   meaning that you need to use a newer version of lint (or Android Studio or
   Gradle plugin etc) to work with these checks.

Expected behavior: No lint issues.

Source code: N/A

Android API version: 29

Material Library version: 1.2.0

Device: N/A

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
seth-gravycommented, Apr 8, 2021

Pinning annotation-experimental solves it, but note that 1.1.0 is now stable.

implementation "androidx.annotation:annotation-experimental:1.1.0"
2reactions
gs-tscommented, Mar 5, 2021

I am still seeing this warning 👀

Read more comments on GitHub >

github_iconTop Results From Across the Web

“Obsolete custom lint check” from `androidx.appcompat ...
This warning flags custom lint checks that are found to be using obsolete APIs and will need to be updated to run in...
Read more >
Android Lint API Guide - Google Samples
A type or class of problem that your lint check identifies. An issue has an associated severity (error, warning or info), a priority,...
Read more >
API changes in 3.1 - Google Groups
lint3.jar: Warning: Lint found an issue registry (com.example.google.lint.MyIssueRegistry) which did not specify the Lint API version it was compiled with.
Read more >
Lint reports UnknownIssueId when using custom issue ids in ...
Lint found an issue registry (com.vanniktech.lintrules.android.IssueRegistry) which was compiled against an older version of lint than this one.
Read more >
Implementing your first Android lint rule - ProAndroidDev
However, the default set of lint rules is limited and in some situations we could benefit from creating custom rules that identify issues...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found