Reputation: 41
I use retrolambda a long time, but suddenly he stopped working in all my projects. I reinstalled jdk, but it didn't help. I didn't find answer in google, i hope you can help me. My gradle files: build.gradle (app):
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 (Project):
// 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 stacktrace:
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]
Upvotes: 3
Views: 4847
Reputation: 886
When I updated the AS project to AS 3.4.1, there were a lot of problems, and I finally got stuck on this error message. There was very little related information on the Internet, let alone the solution. In desperation, I looked at other warnings. The following warning was changed casually:
One of the plugins you are using supports Java 8 language features. To try the support built into the Android plugin, remove the following from your build.gradle
The solution is to remove the previously dependent lambda library, because after version 3.0, AS itself supports lambda
apply plugin: 'me.tatarka.retrolambda' //remove this line
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'me.tatarka:gradle-retrolambda:3.2.4' //remote this line
}
After removing this sentence, synchronize it, and miraculously compiled successfully. It seems that this plug-in library does not exist after version 3.0, and it cannot be recognized.
Upvotes: 0
Reputation: 13431
Add this in app gradle build file before android block (on top)
//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'
}
and I also changed my class path version from 3.4.0 to 3.2.5 and my issue resolved.
Also no need to add retroLambdaConfig
Upvotes: 1
Reputation: 301
Update class path to
classpath 'me.tatarka:gradle-retrolambda:3.2.5'
then add this to your dependencies
retrolambdaConfig 'net.orfjackal.retrolambda:retrolambda:2.3.0'
Add following code to application block
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
After this it should work.
Update:
The latest version of retrolambda
till today (September 11 2017) is 3.7.0
Upvotes: 7