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.

Could not load custom lint check jar file

See original GitHub issue

Hi there,

We’re running android-state v1.2.0. During the lint step we get this error:

[unitTest] :app:kaptDebugKotlin
[unitTest] Could not load custom lint check jar file /opt/android/.gradle/caches/transforms-1/files-1.1/android-state-1.2.0.aar/5b096632efba70fc8ade011deb13c829/jars/lint.jar
[unitTest] java.lang.NoSuchFieldError: Companion
[unitTest] 	at com.evernote.android.state.lint.detector.AndroidStateDetector.<clinit>(AndroidStateDetector.kt:31)
[unitTest] 	at com.evernote.android.state.lint.registry.StateIssueRegistry.<init>(StateIssueRegistry.kt:7)
[unitTest] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[unitTest] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[unitTest] 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[unitTest] 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[unitTest] 	at java.lang.Class.newInstance(Class.java:442)
[unitTest] 	at com.android.tools.lint.client.api.JarFileIssueRegistry$Factory.loadIssueRegistry(JarFileIssueRegistry.kt:210)
[unitTest] 	at com.android.tools.lint.client.api.JarFileIssueRegistry$Factory.get(JarFileIssueRegistry.kt:174)
[unitTest] 	at com.android.tools.lint.client.api.JarFileIssueRegistry$Factory.get(JarFileIssueRegistry.kt:143)
[unitTest] 	at com.android.tools.lint.client.api.LintDriver.registerCustomDetectors(LintDriver.kt:426)
[unitTest] 	at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.kt:357)
[unitTest] 	at com.android.tools.lint.LintCliClient.run(LintCliClient.java:155)
[unitTest] 	at com.android.build.gradle.internal.LintGradleClient.run(LintGradleClient.java:197)
[unitTest] 	at com.android.build.gradle.tasks.LintBaseTask.runLint(LintBaseTask.java:198)
[unitTest] 	at com.android.build.gradle.tasks.LintPerVariantTask.lintSingleVariant(LintPerVariantTask.java:53)
[unitTest] 	at com.android.build.gradle.tasks.LintPerVariantTask.lint(LintPerVariantTask.java:45)
[unitTest] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[unitTest] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[unitTest] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[unitTest] 	at java.lang.reflect.Method.invoke(Method.java:498)
[unitTest] 	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
[unitTest] 	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
[unitTest] 	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
[unitTest] 	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
[unitTest] 	at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:780)
[unitTest] 	at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:747)
[unitTest] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
[unitTest] 	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
[unitTest] 	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
[unitTest] 	at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
[unitTest] 	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
[unitTest] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
[unitTest] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
[unitTest] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
[unitTest] 	at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
[unitTest] 	at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
[unitTest] 	at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
[unitTest] 	at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
[unitTest] 	at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
[unitTest] 	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
[unitTest] 	at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
[unitTest] 	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
[unitTest] 	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
[unitTest] 	at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
[unitTest] 	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
[unitTest] 	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
[unitTest] 	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
[unitTest] 	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
[unitTest] 	at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
[unitTest] 	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
[unitTest] 	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
[unitTest] 	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
[unitTest] 	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
[unitTest] 	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
[unitTest] 	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
[unitTest] 	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
[unitTest] 	at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626)
[unitTest] 	at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581)
[unitTest] 	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
[unitTest] 	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
[unitTest] 	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
[unitTest] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[unitTest] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[unitTest] 	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
[unitTest] 	at java.lang.Thread.run(Thread.java:748)

Any thoughts on what is causing this?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
vRallevcommented, Feb 23, 2018

Do you mind testing it with the Android Gradle Plugin 3.1.0-beta3? I think there were more changes to Lint, that’s why the library is already using it. Otherwise a sample project would be really helpful.

0reactions
vRallevcommented, Feb 24, 2018

Great, thanks for letting me know.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cannot find lint-checks.jar - Stack Overflow
I managed to fix the issue by updating my buildToolsVersion from 26.0.2 to 27.0.3, which also required me to update my Gradle version...
Read more >
Gradle Error: Could not load custom lint check jar file
Hi dear Expo community! I just started off with Expo, so I hope this is the right place to ask (: I'm getting...
Read more >
Android build failed - could not load custom lint check jar file
Recent Android build failed due to following error: “Could not load custom lint check jar file ...
Read more >
Pressing "Make Project" does not prepare custom Lint checks ...
Notice that app/build.gradle declares a lintChecks dependency on the :custom_lint_checks module. You can check whether the custom Lint checks are working by ...
Read more >
What gradle task to build our custom checks lint jar?
Custom lint rule jar /Users/coltonidle/.gradle/caches/modules-2/files-2.1/org.jetbrains.intellij.deps/trove4j/1.0.20181211/ ...
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