Home » Android » Difference between android.enableD8.desugaring in Android Studio 3.1 and android.enableD8

Difference between android.enableD8.desugaring in Android Studio 3.1 and android.enableD8

Posted by: admin June 15, 2020 Leave a comment

Questions:

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 android.enableD8 option?

How to&Answers:

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.

Source:
https://android-developers.googleblog.com/2017/08/next-generation-dex-compiler-now-in.html