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.
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() {
}
});
}
};
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'.
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: