In Android Studio 3.0 there is an option
android.enableD8 to enable D8 (Next-generation Dex Compiler).
In Android Studio 3.1 a new option was added for this like
android.enableD8.desugaring as per their updates.
What actually does
android.enableD8.desugaring do in Android Studio 3.1 and what’s the difference compared to the
desugar step is executed normally after
javac to optimize the bytecode. Enabling desugaring in D8 will remove that step entirely, and execute
desugar as part of D8, making it faster and more optimized.