Troubleshooting
If you encounter a dependency that requires Java 8+ APIs, such as enabling core library desugaring to ensure compatibility across Android versions, do the following:
1.
Update compileOptions by adding the following to your build.gradle file.
android {
compileOptions {
isCoreLibraryDesugaringEnabled = true
}
}
2.
Add the desugaring dependency.
dependencies {
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
}
This enables modern Java features on older Android versions.
Last updated on