Starting with Batch 1.14.0, the Android SDK requires a Java 8 source level.

If you encounter the following errors:

Invoke-customs are only supported starting with Android O  (--min-api 26)

or

The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle

or

Error: Default interface methods are only supported starting with Android N (--min-api 24)

You will need to add the following to your build.gradle, to enable Java 8 support through desugaring in your project.

android {
  // ...
  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }
}
Did this answer your question?