Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompa
当使用java8最新的lambda时候,在android studio中无法编译通过。
解决方法:
需要在build.gradle 这么写:
android { ... compileSdkVersion 23 buildToolsVersion "24rc2" defaultConfig { ... jackOptions { enabled true } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } }