本文使用的开发环境为 :
project.build.gradle
buildscript {
repositories {
....
}
dependencies {
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'me.tatarka:gradle-retrolambda:3.4.0'
.....
}}
app.build.gradle
apply plugin: 'me.tatarka.retrolambda'
......
android{
.....
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
repositories {
}
dependencies {
..........
compile 'com.jakewharton:butterknife:8.5.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
}
}
注 : 不要使用 jackOptions.enabled true
本文摘至 : http://stackoverflow.com/questions/43625279/use-lambda-expressions-and-butterknife