0

AWS Device Farm Gradle プラグインのセットアップのガイドに従って、アプリケーションをセットアップして実行./gradlew devicefarmUploadしましたが、多くのエラーが発生しました。調べてみると、(Retrolambda を介して) ラムダ式を使用するたびにエラーが発生したことがわかりました。

app.apktesting.apkを AWS Device Farm に手動でアップロードすると、問題なく動作します。

すべてのラムダ式でビルドが失敗します。そのうちの 1 つを以下に貼り付けます。

Failed converting ECJ parse tree to Lombok for file /home/vedant/android/src/unacademy/app/src/main/java/com/unacademy/app/production/UploadHelper.java
java.lang.UnsupportedOperationException: Unknown ASTNode child: LambdaExpression
at lombok.ast.ecj.EcjTreeVisitor.visitOther(EcjTreeVisitor.java:368)
at lombok.ast.ecj.EcjTreeVisitor.visitEcjNode(EcjTreeVisitor.java:364)
at lombok.ast.ecj.EcjTreeConverter.visit(EcjTreeConverter.java:295)
at lombok.ast.ecj.EcjTreeConverter.toTree(EcjTreeConverter.java:236)
at lombok.ast.ecj.EcjTreeConverter.fillList(EcjTreeConverter.java:282)
at lombok.ast.ecj.EcjTreeConverter.fillList(EcjTreeConverter.java:252)
at lombok.ast.ecj.EcjTreeConverter.access$100(EcjTreeConverter.java:141)
at lombok.ast.ecj.EcjTreeConverter$2.visitMessageSend(EcjTreeConverter.java:1042)
at lombok.ast.ecj.EcjTreeVisitor.visitEcjNode(EcjTreeVisitor.java:156)
at lombok.ast.ecj.EcjTreeConverter.visit(EcjTreeConverter.java:295)
at lombok.ast.ecj.EcjTreeConverter.toTree(EcjTreeConverter.java:236)
at lombok.ast.ecj.EcjTreeConverter.fillList(EcjTreeConverter.java:282)
at lombok.ast.ecj.EcjTreeConverter.fillList(EcjTreeConverter.java:252)
at lombok.ast.ecj.EcjTreeConverter.toBlock(EcjTreeConverter.java:397)
at lombok.ast.ecj.EcjTreeConverter.access$1500(EcjTreeConverter.java:141)
at lombok.ast.ecj.EcjTreeConverter$2.visitMethodDeclaration(EcjTreeConverter.java:1241)
at lombok.ast.ecj.EcjTreeVisitor.visitEcjNode(EcjTreeVisitor.java:152)
at lombok.ast.ecj.EcjTreeConverter.visit(EcjTreeConverter.java:295)
at lombok.ast.ecj.EcjTreeConverter.toTree(EcjTreeConverter.java:236)
at lombok.ast.ecj.EcjTreeConverter.fillList(EcjTreeConverter.java:282)
at lombok.ast.ecj.EcjTreeConverter.fillList(EcjTreeConverter.java:252)
at lombok.ast.ecj.EcjTreeConverter.access$100(EcjTreeConverter.java:141)
at lombok.ast.ecj.EcjTreeConverter$2.createNormalTypeBody(EcjTreeConverter.java:563)
at lombok.ast.ecj.EcjTreeConverter$2.visitTypeDeclaration(EcjTreeConverter.java:486)
at lombok.ast.ecj.EcjTreeVisitor.visitEcjNode(EcjTreeVisitor.java:48)
at lombok.ast.ecj.EcjTreeConverter.visit(EcjTreeConverter.java:295)
at lombok.ast.ecj.EcjTreeConverter.toTree(EcjTreeConverter.java:236)
at lombok.ast.ecj.EcjTreeConverter.fillList(EcjTreeConverter.java:282)
at lombok.ast.ecj.EcjTreeConverter.fillList(EcjTreeConverter.java:252)
at lombok.ast.ecj.EcjTreeConverter.access$100(EcjTreeConverter.java:141)
at lombok.ast.ecj.EcjTreeConverter$2.visitCompilationUnitDeclaration(EcjTreeConverter.java:441)
at lombok.ast.ecj.EcjTreeVisitor.visitEcjNode(EcjTreeVisitor.java:264)
at lombok.ast.ecj.EcjTreeConverter.visit(EcjTreeConverter.java:295)
at com.android.tools.lint.EcjParser.parseJava(EcjParser.java:496)
at com.android.tools.lint.client.api.JavaVisitor.visitFile(JavaVisitor.java:245)
at com.android.tools.lint.client.api.LintDriver.checkJava(LintDriver.java:1527)
at com.android.tools.lint.client.api.LintDriver.runFileDetectors(LintDriver.java:1061)
at com.android.tools.lint.client.api.LintDriver.checkProject(LintDriver.java:906)
at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:435)
at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:376)
at com.android.tools.lint.LintCliClient.run(LintCliClient.java:128)
at com.android.build.gradle.internal.LintGradleClient.run(LintGradleClient.java:116)
at com.android.build.gradle.internal.LintGradleClient$run.call(Unknown Source)
at com.android.build.gradle.tasks.Lint.runLint(Lint.groovy:196)
at com.android.build.gradle.tasks.Lint.this$6$runLint(Lint.groovy)
at com.android.build.gradle.tasks.Lint$this$6$runLint$4.callCurrent(Unknown Source)
at com.android.build.gradle.tasks.Lint.lintSingleVariant(Lint.groovy:171)
at com.android.build.gradle.tasks.Lint$lintSingleVariant$3.callCurrent(Unknown Source)
at com.android.build.gradle.tasks.Lint.lint(Lint.groovy:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:226)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:219)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:208)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:589)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:572)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:310)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:90)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:50)
at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:27)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:40)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:169)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
4

1 に答える 1

1

このエラーは、gradle retrolambda の既知の問題セクションに記載されています。

解決策は、エラーなしでラムダ式を使用して lint を実行できるようにするロンボク フォークを使用することです。

buildscript {
    repositories {
        jcenter()
        ...
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:<version>'
        classpath 'me.tatarka:gradle-retrolambda:<version>'
        classpath 'me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2'
    }

    // Exclude the version that the android plugin depends on.
    configurations.classpath.exclude group: 'com.android.tools.external.lombok'
}
于 2015-12-16T21:20:35.937 に答える