Butterknife: processReleaseResources error found

Created on 26 Jul 2017  ·  5Comments  ·  Source: JakeWharton/butterknife

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':icore-module:processReleaseResources'.

    com.github.javaparser.ast.CompilationUnit.getTypes()Lcom/github/javaparser/ast/NodeList;

  • Try:
    Run with --debug option to get more log output.

  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':icore-module:processReleaseResources'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:84)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:55)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
    at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:236)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:228)
    at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:228)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:215)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:77)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:58)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
    at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
    Caused by: java.lang.NoSuchMethodError: com.github.javaparser.ast.CompilationUnit.getTypes()Lcom/github/javaparser/ast/NodeList;
    at butterknife.plugin.FinalRClassBuilder.brewJava(FinalRClassBuilder.java:41)
    at butterknife.plugin.ButterKnifePlugin$applyPlugin$1$1$1.execute(ButterKnifePlugin.kt:34)
    at butterknife.plugin.ButterKnifePlugin$applyPlugin$1$1$1.execute(ButterKnifePlugin.kt:15)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:632)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:615)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:95)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:76)
    ... 20 more

Most helpful comment

I got the same problem
run gradlew buildEnvironment to see the detail dependencies, and found both butterknife and freeline have a dependency of javaparser which of them are in different version.

remove one of them,and then it works well.

All 5 comments

This is a configuration problem with your build setup. The Gradle plugin declares a dependency on the version it needs. Either you're pulling in an old version, a too new version that breaks the API, or excluding the transitive dependency. You can try the buildEnvironment task to see more info, but there's nothing Butter Knife can do to fix this since it's local to your project.

I got the same problem. How can I fix it ?

Just use an old version 8.5.0

发自网易邮箱大师
On 07/31/2017 15:04, ChasonChen wrote:

I got the same problem. How can I fix it ?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@gao746700783 It works for me. Thank you.

I got the same problem
run gradlew buildEnvironment to see the detail dependencies, and found both butterknife and freeline have a dependency of javaparser which of them are in different version.

remove one of them,and then it works well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ZakTaccardi picture ZakTaccardi  ·  3Comments

alejandro-pnz picture alejandro-pnz  ·  3Comments

Pitel picture Pitel  ·  3Comments

mturki picture mturki  ·  3Comments

ernestp picture ernestp  ·  3Comments