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
6
votes
1 answer

How do method references in RxJava work?

Can someone explain me, how come both of the lambdas can be replaced with method references here? In RxJava, map() takes a parameter of type Func1, whose comment states that it "Represents a function with one argument". Thus I completely…
Grzegorz D.
  • 1,748
  • 15
  • 18
6
votes
3 answers

Correct flow in RxJava with Retrofit and Realm

I'm implementing network API with the combination of RxJava and Retrofit, and I use Realm as my database. I got it pretty much working but I'm wondering if it is the correct approach and flow of events. So, here is the RetrofitApiManager. public…
Michał
  • 108
  • 2
  • 7
5
votes
0 answers

Retrolambda $Lambda not found

I was doing some work with Android and wanted to test Retrolambda with it. But unfortunately I have encountered an issue. I have an Dialog class that takes a Consumer as parameter: public class AuthDialog extends Dialog { public static final…
Haito
  • 2,039
  • 1
  • 24
  • 35
5
votes
1 answer

Android Application + Java Module (Java 1.8)

Android Project (gradle) has main application module: app - android application (apply plugin: 'com.android.application') and java-module: network - (apply plugin: 'java') java module network has source code compatibility 1.8 by default and I really…
Yura Buyaroff
  • 1,718
  • 3
  • 18
  • 31
5
votes
2 answers

Installed the latest version of Android Studio, Exception occurred when I built the project?

An Android project, It was good with the older version of Android Studio. But after I updated the IDE version, An exception will occured when I build the project whith gradle. Here is the problem: Error:Execution failed for task…
Waylan Punch
  • 239
  • 4
  • 17
5
votes
1 answer

Retrolambda on Google App Engine

Is anyone using Retrolambda for a Google App Engine project? What does your pom.xml look like? It's straightforward to compile for JDK8 and set up retrolambda's maven plugin. However, to deploy to GAE, Google's appengine-maven-plugin needs to be run…
5
votes
1 answer

Retrolambda on Travis CI

My travis.yml file: language: android jdk: oraclejdk8 android: components: - build-tools-22.0.1 - android-22 - extra-android-m2repository script: - gradle build connectedCheck It fails during app:compileRetrolambdaDebug with…
Pavel Synek
  • 1,191
  • 8
  • 13
5
votes
2 answers

java.lang.NoSuchMethodError on compile

I'm trying to compile an Android project unsuccessfully. The error message is: Execution failed for task ':mobile:_compileAppDebug'. java.lang.NoSuchMethodError:…
t3rse
  • 10,024
  • 11
  • 57
  • 84
4
votes
0 answers

java.lang.NoClassDefFoundError: lambda with Android API 23

I want to use method-references on Android API 23 and am stuck. I tried retrolambda and some other methods but it still doesn't work. RequestClass.doRequestWithApi(this.getApplicationContext(), this.TAG, dataToPass, this::getMyAccount); I am using…
4
votes
3 answers

Retrolambda Error:Cannot get property 'destinationDir' on null object

I am trying to use retrolambda in my application but I face issues build.gradle project buildscript { repositories { jcenter() mavenLocal() } dependencies { classpath 'com.android.tools.build:gradle:2.1.3' …
Mina Fawzy
  • 20,852
  • 17
  • 133
  • 156
4
votes
1 answer

Error:Execution failed for task ':app:compileRetrolambdaLiveDebug

I'm using this apply plugin: 'me.tatarka.retrolambda' in my project. but sometimes then I build my project, android studio will show me this error. And I don't know how to do but just clean my project and it will be ok. but it waste time to clean.…
sea
  • 51
  • 2
4
votes
2 answers

Lambda expressions - can not set lambda parameter as argument to method

I'm trying use lambda expressions on Android using retrolambda. In code below I need to add listener that is interface: public interface LoginUserInterface { void onLoginSuccess(LoginResponseEntity login); void…
Yura Buyaroff
  • 1,718
  • 3
  • 18
  • 31
4
votes
3 answers

convert to lambda from rx java expression

I've started to grok into retrolambda and rxjava. Some expressions i'v converted by myself, but some of them i can't convert. I've added retrolambda to my project.Here is examples public Observable> getUsersRepositories()…
Jenya Kirmiza
  • 511
  • 8
  • 21
4
votes
1 answer

Is it a good practice to use JAVA 8 for android development?

I read the instructions for using Java8 for android development from this answer and (orfjackal/retrolambda). I wanted to know if it is a good practice to use this technique to implement Java 8. Does this affects the application performance? It is…
harsh_v
  • 3,193
  • 3
  • 34
  • 53
3
votes
0 answers

Error:Execution failed for task ':app:compileRetrolambdaDebug' - After Firebase integration

I am creating an application with the support of Retrolambda & RxJava2. Everything works fine until I needed to implement push notification functionality. I have configured firebase in my application, since then the execution failed with below error…