D8: Invoke-customs are only supported starting with Android O (--min-api 26)
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle
android {
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}
See https://developer.android.com/studio/write/java8-support.html for details.
Alternatively, increase the minSdkVersion to 26 or above.
buildscript{repositories{// Make sure that you have the following two repositoriesgoogle()// Google's Maven repositorymavenCentral()// Maven Central repository}dependencies{...// Add the Maven coordinates and latest version of the pluginclasspath("PLUGIN_MAVEN_COORDINATES:PLUGIN_VERSION")}}allprojects{...repositories{// Make sure that you have the following two repositoriesgoogle()// Google's Maven repositorymavenCentral()// Maven Central repository}}
Groovy
buildscript{repositories{// Make sure that you have the following two repositoriesgoogle()// Google's Maven repositorymavenCentral()// Maven Central repository}dependencies{...// Add the Maven coordinates and latest version of the pluginclasspath'PLUGIN_MAVEN_COORDINATES:PLUGIN_VERSION'}}allprojects{...repositories{// Make sure that you have the following two repositoriesgoogle()// Google's Maven repositorymavenCentral()// Maven Central repository}}