Questions tagged [retrolambda]

Retrolambda is a backport of Java 8's lambda expressions to Java 7, 6 and 5

Retrolambda lets you run Java 8 code with lambda expressions, method references and try-with-resources statements on Java 7, 6 or 5. It does this by transforming your Java 8 compiled bytecode so that it can run on an older Java runtime. After the transformation they are just a bunch of normal .class files, without any additional runtime dependencies.

The GitHub project can be found here: https://github.com/orfjackal/retrolambda

103 questions
2
votes
0 answers

Retrolambda and web applications

I'd like to use lambda expressions offered by Java 8. However, I'm restricted to JRE 6. I know that retrolambda can do a backporting of code. But, is it possible to use retrolambda for a web application (.war)? Actually, I'd like to write code…
tnas
  • 510
  • 5
  • 16
2
votes
1 answer

NoSuchMethodError using Android Jack toolchain

I'm trying to enable Java 8 new language features by using Jack toolchain. I've removed retrolambda and android apt plugin from my Android Project but I'm getting this error: Error:Execution failed for task…
notGeek
  • 1,394
  • 5
  • 21
  • 40
2
votes
0 answers

retrolambda gradle execute error

Today, I use retrolamda-gradle plugin in my Android project. Sync process is ok, but when I run project I get error like: 1: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'. >…
HuangDong.Li
  • 291
  • 1
  • 2
  • 9
2
votes
1 answer

Android: NoSuchMethodError with static method in interface (using Retrolambda)

In my project I am trying to use code written in Java 8 in Android app using Retrolambda plugin and Lightweight-Stream-API to bypass code compatibility. The source project runs well on Java platform (clarified). After porting the code to Android, I…
Ellrohir
  • 1,017
  • 1
  • 14
  • 32
2
votes
0 answers

java.lang.NoClassDefFoundError: java.util.Objects - Android 4.1 and Retrolambda

I am experiencing a crash that I am not 100% sure what is going on. My suspicions are that it has to do with what retrolambda is doing under the hood to achieve the use of lambdas pre-Java 8. I am receiving the following crash: 04-21 13:50:32.609…
ariets
  • 4,218
  • 4
  • 28
  • 34
2
votes
1 answer

RetroLambda with TextChangedListener

Hi there I am new to RetroLambda. Right now I'm using it with Runnable, OnClickListener etc. The question is: is it possible to use RetroLambda with classes like onTextChangeListener? For example how to lambda this…
Anton Kazakov
  • 2,740
  • 3
  • 23
  • 34
2
votes
2 answers

Failed to use gradle--retrolambda build project in OSX

I'm a rookie with OSX. Today I try to use RxJava and Retrolambda in Android Studio, Retrolambda needs gradle--retrolambda. So I started config: 1.I pasted a little code to ~/.bash_profile to set the JAVA7_HOME and JAVA8_HOME export…
Ezio Shiki
  • 745
  • 6
  • 23
1
vote
0 answers

Can I avoid retrolambdas capturing the reference to the enclosing class?

I implemented history by letting my forms to implement reconstructor, which is a lambda-returning method. It can be as simple as @Override protected Supplier reconstructor() { return () -> new MyForm1(); } or more complicated like…
maaartinus
  • 44,714
  • 32
  • 161
  • 320
1
vote
0 answers

Hard configuration Retrolambda

I'm trying to add library retrolambda to my project. On the official website we have short instruction which no works: add some plugins to build.gradle. After that I got from AndroudStudio error: One of the plugins you are using supports Java 8…
companyn2
  • 85
  • 1
  • 9
1
vote
2 answers

RxJava1 to Rxjava2 Migration Error

Converting RxJava1 code to RXJava2 Giving this error, not sure what i'm doing wrong no instance(s) of type variable(s) R exist so that Single> conforms to ObserableSource API Call @GET("/search/users?per_page=2") Observable
Sam
  • 6,215
  • 9
  • 71
  • 90
1
vote
2 answers

Project not compiling using Kotlin in Project

I have a problem Compiling my program when I add some class in Kotlin in it. When I do a clean of the project, and Start running it, the next error is prompt: Error:Execution failed for task ':app:compileRetrolambdaMyProject'. Process 'command…
Alvaro
  • 491
  • 3
  • 16
1
vote
0 answers

Android studio retrolambda debugging

I'm talking about debugging in Android Studio. Is it possible to access outer class variable inside of retrolambda code? For example: MyActivity extends Activity { MyObject mObject; View mView; ... mView.setOnClickListener(view ->…
1
vote
0 answers

Retrolambda doesn't apply to a test build of an Android app

I have found that my android project isn't transformed by Retrolambda if it compiled to unit testing purposes. Any submodule transformed correcty instead of the root application. How can I force a RL trnsformations for a test purposes?
Viacheslav Smityukh
  • 5,652
  • 4
  • 24
  • 42
1
vote
0 answers

Compilation failing when trying to run in API 16

I'm doing an app with RxJava2, Retrofit2, Retrolambda, etc. I have running the app well in the emulator with the latest SDK Nougat, but now I need to test on API 16, but I'm getting the next error. I'm going crazy with this. Error:Execution failed…
Víctor Martín
  • 3,352
  • 7
  • 48
  • 94
1
vote
1 answer

RetroLamba not working with android studio

I have added retrolambda to my android project but when I try to run the project it shows the following error. Error:Execution failed for task ':app:compileRetrolambdaDebug'. A problem occurred starting process 'command 'C:\Program…
karan
  • 8,637
  • 3
  • 41
  • 78