2017-02-12 6 views
2

저는 retrolambda를 오랫동안 사용하지만 갑자기 모든 프로젝트에서 작업을 중단했습니다. jdk를 재설치했지만 도움이되지 않았습니다. 나는 구글에서 대답을 찾지 못했습니다, 당신이 나를 도울 수 있기를 바랍니다. 내 Gradle을 파일 : build.gradle (응용 프로그램) :'app : compileRetrolambdaDebug'의 실행에 실패했습니다.

apply plugin: 'com.android.application' 
apply plugin: 'me.tatarka.retrolambda' 

    android { 
     compileSdkVersion 25 
     buildToolsVersion "25.0.1" 
     defaultConfig { 
      applicationId "xsystem.ru.test" 
      minSdkVersion 16 
      targetSdkVersion 25 
      versionCode 1 
      versionName "1.0" 

     } 
     buildTypes { 
      release { 
       minifyEnabled false 
       proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
      } 
     } 

     compileOptions { 
      sourceCompatibility JavaVersion.VERSION_1_8 
      targetCompatibility JavaVersion.VERSION_1_8 
     } 


    } 



    dependencies { 
     compile fileTree(dir: 'libs', include: ['*.jar']) 
     compile 'com.android.support:appcompat-v7:25.1.0' 
    } 

build.gradle (프로젝트) :

// Top-level build file where you can add configuration options common to all sub-projects/modules. 

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.2.3' 
     classpath 'me.tatarka:gradle-retrolambda:3.2.0' 
     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 
    repositories { 
     jcenter() 
    } 

} 


task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

Gradle을의 스택 트레이스 :

19:32:51.295 [ERROR] [org.gradle.BuildExceptionReporter] 
19:32:51.295 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception. 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong: 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':app:compileRetrolambdaDebug'. 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] > Process 'command 'C:\Program Files\Java\jdk1.8.0_121\bin\java.exe'' finished with non-zero exit value -1073740791 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is: 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileRetrolambdaDebug'. 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69) 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66) 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52) 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53) 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203) 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185) 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66) 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50) 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54) 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40) 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_121\bin\java.exe'' finished with non-zero exit value -1073740791 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:367) 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:31) 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.file.DefaultFileOperations.javaexec(DefaultFileOperations.java:170) 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.javaexec(AbstractProject.java:848) 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.javaexec(AbstractProject.java:844) 
19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.Project$javaexec$11.call(Unknown Source) 
19:32:51.297 [ERROR] [org.gradle.BuildExceptionReporter] at me.tatarka.RetrolambdaTask.execute(RetrolambdaTask.groovy:69) 
19:32:51.297 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75) 
19:32:51.297 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:245) 
19:32:51.297 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221) 
19:32:51.297 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:232) 
19:32:51.297 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210) 
19:32:51.297 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80) 
19:32:51.297 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61) 
19:32:51.297 [ERROR] [org.gradle.BuildExceptionReporter] ... 14 more 
19:32:51.297 [ERROR] [org.gradle.BuildExceptionReporter] 
+0

당신은 어떤 솔루션을 받으셨어요 retroLambdaConfig을 추가 할 필요가 없습니다? 나는 같은 문제가있다. – vidha

답변

5

업데이트 클래스 패스

classpath 'me.tatarka:gradle-retrolambda:3.2.5' 

다음으로 th 작동해야이 후 응용 프로그램 블록

compileOptions { 
    sourceCompatibility JavaVersion.VERSION_1_8 
    targetCompatibility JavaVersion.VERSION_1_8 
} 

retrolambdaConfig 'net.orfjackal.retrolambda:retrolambda:2.3.0' 

추가 다음 코드는 의존성이다.

업데이트 :
오늘까지 retrolambda의 최신 버전 (2017년 9월 11일가) 3.7.0

+0

답변 해 주셔서 감사합니다. 하지만, 같은 오류가 발생했습니다 : ( – promerbay

+0

사실, 종속성에'retrolambdaConfig'를 설정하지 않은 것이 더 좋으므로이 버전을 덮어 쓰는 것은 좋지 않습니다. 클래스 경로에서 retrolambda 버전을 업데이트하면됩니다. – haroldolivieri

0

//noinspection GradleCompatible 
    apply plugin: 'com.android.application' 
    apply plugin: 'me.tatarka.retrolambda' 

tasks.whenTaskAdded { task -> 
if (task.name.startsWith("lint")) { 
    task.enabled = false 
    } 
} 


retrolambda { 
jvmArgs '-noverify' 
} 
(위에) 안드로이드 블록 전에 응용 프로그램 Gradle을에 빌드 파일이 추가입니다

및 클래스 경로 버전을 3.4.0에서 으로 변경했습니다. 3.2.5 문제가 해결되었습니다. 또한