June 2017
Intermediate to advanced
400 pages
8h 44m
English
First, let's get Retrolambda set up. We will also leverage a quick unit test to see whether it works correctly. Open the ExampleUnitTest.java file that was created with the project template. Remove the sample unit test method inside it and declare a new one called lambdaTest(). Inside it, try to declare a Callable<Integer> with a lambda, as shown in the following figure. Note that it throws a compiler error because we are not using Java 8 to support lambdas.

We cannot use Java 8 if we are targeting Android Lollipop, so we need Retrolambda to ...
Read now
Unlock full access