gradle-retrolambda icon indicating copy to clipboard operation
gradle-retrolambda copied to clipboard

BUG: Compile Error - Gradle task: compileRetroLambdaDebug (reproducible)

Open smp4903 opened this issue 8 years ago • 0 comments

Using lambda expressions with the Handler to post a Runnable inside an AjaxCallback produces a compile error. However, using the regular anonymous class works fine AND using the lambda expression outside of the callback also works.

The produced error is:

Error:Execution failed for task ':app:compileRetrolambdaDebug'.

Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

The error seems to be produced by the interaction between RetroLambda and AndroidQuery.

Sample project to reproduce

Simply try to compile the project.

The specific code that triggers the bug:

    new Handler().post(() -> { });         // works

    AjaxCallback<Bitmap> callback = new AjaxCallback<Bitmap>() {
        @Override
        public void callback(String url, final Bitmap bitmap, AjaxStatus status) {

            new Handler().post(() -> { });        // does NOT work

            new Handler().post(new Runnable() {     // works
                @Override
                public void run() {

                }
            });
        }
    };

smp4903 avatar May 02 '17 10:05 smp4903