Android Studio provides built-in support for using certain Java 8 language features and third-party libraries that use them. As shown in figure 1, the default toolchain implements the new language features by performing bytecode transformations, called desugar, on the output of the javac compiler. Jack is no longer supported, and you should first disable Jack to use the Java 8 support built into the default toolchain.
在使用android gradle 3.0之后,即使不使用retrolambda插件,也可以使用大部分Java8特性。 官方文档说明如下:
我太懂python,但我还是看了一下。目前freeline是通过检测使用启用了retrolambda来确定javac的编译参数(默认是1.7,使用了retrolambda的话就是1.8)
我尝试过把这个判断去掉,并且修改代码:
全量编译ok,增量编译出错。错误如下:
不知,freeline能否支持Gradle 3.0中的desugar编译?