1

I'm working on an Android project with two projects inside it. When trying to run a build with gradlew (./gradlew build), I see the following error:

Execution failed for task ':example:lint'.

Could not initialize class com.android.build.gradle.tasks.Lint$LintGradleIssueRegistry

With stacktrace enabled, this is listed as a java.lang.NoClassDefFoundError.

Oddly, the first time I ran this (which downloaded dependencies), the build failed with a different error:

Execution failed for task ':example:lint'.

lombok/ast/Node

The gradle wrapper that Android SDK created for the project is using Gradle 2.8.

Could this be a configuration issue with the project or my dev machine? I'm trying to avoid using the Android SDK lint tool as this complains about the projects using Gradle (and I hear it may miss some parts of these projects).

1
  • As an update, I see the same error(s) with Gradle 2.11. Commented Feb 23, 2016 at 16:45

1 Answer 1

1

Turned out this was a configuration issue in our build.gradle. The following line had been added for testing and never removed:

configurations.classpath.exclude group: 'com.android.tools.external.lombok'

As such, the classes needed for linting were missing.

The following discussion pointed us in the right direction, in case it's useful to anyone else:

https://github.com/evant/gradle-retrolambda/issues/96

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.