Home Tutorials How 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 the unused code as well as resources which 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:


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 also reduced little. Old Size we were using R8 and New Size we were using Proguard.

Compare R8 and Proguard

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
Aditya Singh
Hi, I’m Aditya Singh. The Co-Founder of this blog AndroidHire. I’m Part-Time blogger, and digital marketer. If you want to contribute then you can contact us at contact@androidhire.com


Please enter your comment!
Please enter your name here

Most Popular

Expandable List View in Android

This is a tutorial based on the Android expandable list view which has the capability to group items and when the user...

How to check if your phone case is blocking signal or not?

Most of the times our phone cases block signals resulting into frustration. In this post you would learn how to check if your phone case blocks the signals or not

Compare Nokia 3.2, Nokia 4.2 and Nokia 1 Plus

We all know that Nokia has come up with its all-new 5 camera smartphone called Nokia 9 Pureview. But Nokia is not behind in...

‘My Apps’ section gets Storage Indicator, Although limited Rollout

Recently in a few days, we have seen quite small tweaks and UI changes in Google’s Play Store. From a few people, we have...