just use java 1.8 and set following works for me: it seems need the latest build tools and using jack
android {
compileSdkVersion 23
buildToolsVersion 24rc3
defaultConfig {
...
jackOptions {
enabled true
}
}
dexOptions {
incremental true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}