With the release of Android Studio 3.0 Beta release, the android studio provides next-generation dex compiler, D8 to compile code and build android APK. Currently, D8 is available for preview.
Check more details: https://android-developers.googleblog.com/2017/08/next-generation-dex-compiler-now-in.html
How to enable build using D8 in android studio?
D8 is a dexer that converts java byte code to dex code. R8 is a java program shrinking and minification tool that converts java byte code to optimized dex code.
d8 is a command-line tool that Android Studio and the Android Gradle plugin use to compile your project's Java bytecode into DEX bytecode that runs on Android devices. d8 lets you use Java 8 language features in your app's code. d8 is also included as a standalone tool in Android Build Tools 28.0.
The Dex compiler converts the class files into the . dex file that run on the Dalvik VM. Multiple class files are converted into one dex file.
dexdump should be located in a version-specific folder under the build-tools/ folder of your Android sdk installation - at least if the latter is fully installed (ie, you can build and run apps).
To enable D8 for your Android Studio 3.0 Beta, you can add following line in your project's gradle.properties file:
android.enableD8=true
If you do not have a gradle.properties file simple create it in your's root project directory (or folder) and add this line:
android.enableD8=true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With