Android项目中使用lambda表达式或Java8新特性,需要在app/build.gradle中添加如下配置
android { ... defaultConfig { ... jackOptions.enabled = true } compileOptions{ sourceCompatibility org.gradle.api.JavaVersion.VERSION_1_8 targetCompatibility org.gradle.api.JavaVersion.VERSION_1_8 }}
时间: 2024-10-12 19:57:25