3

Android Studio を 2.3 にアップグレードした後、最近プロジェクトをビルドすると、このエラーが表示され続けます。

FAILURE: ビルドは例外で失敗しました。

  • 問題: タスク ':app:compileRetrolambdaLocalDebug' の実行に失敗しました。

    プロセス 'コマンド '/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java'' の開始中に問題が発生しました

  • 試してみてください: --stacktrace オプションを指定して実行し、スタック トレースを取得します。--info または --debug オプションを指定して実行し、より多くのログ出力を取得します。

クリーニングと再構築により、問題は解決しました。しかし、これを何度も繰り返さなければならないのは非常に時間がかかります。より良い回避策はありますか?

編集:


ターミナルでのコンパイル$ ./gradlew --stacktrace --info assembleDebug:

* What went wrong:
Execution failed for task ':app:compileRetrolambdaLocalDebug'.
> A problem occurred starting process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin/java''

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

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileRetrolambdaLocalDebug'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
        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.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:237)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
        at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: org.gradle.process.internal.ExecException: A problem occurred starting process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin/java''
        at org.gradle.process.internal.DefaultExecHandle.setEndStateInfo(DefaultExecHandle.java:197)
        at org.gradle.process.internal.DefaultExecHandle.failed(DefaultExecHandle.java:327)
        at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:86)
        ... 2 more
Caused by: net.rubygrapefruit.platform.NativeException: Could not start '/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin/java'
        at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:27)
        at net.rubygrapefruit.platform.internal.WrapperProcessLauncher.start(WrapperProcessLauncher.java:36)
        at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:68)
        ... 2 more
Caused by: java.io.IOException: Cannot run program "/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin/java" (in directory "/Users/yuchen/Documents/MountainView2/app"): error=7, Argument list too long
        at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25)
        ... 4 more
Caused by: java.io.IOException: error=7, Argument list too long
        ... 5 more



BUILD FAILED

ターミナルでのコンパイル$ ./gradlew --stacktrace --debug assembleDebug:

15:31:43.654 [ERROR] [org.gradle.BuildExceptionReporter]        ... 2 more
15:31:43.654 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.io.IOException: Cannot run program "/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin/java" (in directory "/Users/yuchen/Documents/MountainView2/app"): error=7, Argument list too long
15:31:43.654 [ERROR] [org.gradle.BuildExceptionReporter]        at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25)
15:31:43.655 [ERROR] [org.gradle.BuildExceptionReporter]        ... 4 more
15:31:43.655 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.io.IOException: error=7, Argument list too long
15:31:43.656 [ERROR] [org.gradle.BuildExceptionReporter]        ... 5 more
15:31:43.656 [ERROR] [org.gradle.BuildExceptionReporter] 
15:31:43.656 [LIFECYCLE] [org.gradle.BuildResultLogger] 
15:31:43.656 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
4

1 に答える 1