HomeMobileAndroidHow to Add R8 in Android Studio

How to Add R8 in Android Studio

Android R8 is available in Android Studio 3.4. shrinking helps to decrease the size of your APK by removing unused code as well as resources that are of no use.

While comparing the Proguard and R8 in code shrinking, R8 shrinks the code faster than Proguard.

You can set R8 in our project’s gradle.properties file:

android.enableR8=true
android.enableR8.fullMode=true

Full mode is not directly compatible with Proguard, So you have to remove the Proguard.

When comparing the R8 and Proguard, R8 works better and the size is also reduced a little. Old Size we were using R8 and New Size we were using Proguard.

Compare R8 and Proguard
@AndroidHire

Where to add Android R8 In AndroidStudio

  • Go to the gradle Script
  • Then Tap on project’s gradle.properties
  • Add the script in the file
gradle-property-android
@AndroidHire
Aditya Singh
Aditya Singhhttps://optimizegoal.com
I'm a tech writer with over seven years of experience. I love to help people understand tech through my articles. I write about technology, mobiles, PCs, how-tos & guides, news and gadget reviews. I always stay updated with the latest in tech to give you the best info.

Related Articles

Popular Post