Lambda expressions crash with IncompatibleClassChangeError in Android when using jack Lambda expressions crash with IncompatibleClassChangeError in Android when using jack android android

Lambda expressions crash with IncompatibleClassChangeError in Android when using jack


Google are no longer supporting android-jack.

Jack is no longer supported, and you should first disable Jack to use the Java 8 support built into the default toolchain

Android Studio 3.0 and later supports Lambdas expressions. Configure build.gradle file:

android {...// Configure only for each module that uses Java 8// language features (either in its source code or// through dependencies).compileOptions {  sourceCompatibility JavaVersion.VERSION_1_8  targetCompatibility JavaVersion.VERSION_1_8 }}

Note: If Android Studio detects that your project is using Jack, Retrolambda, or DexGuard, the IDE uses Java 8 support provided by those tools instead. However, consider migrating to the default toolchain