Home » Android » Is r8 enabled on existing project after updating Android studio?

Is r8 enabled on existing project after updating Android studio?

Posted by: admin June 15, 2020 Leave a comment

Questions:

I updated Android studio and if I’m correct the update includes R8 by default to my projects. The question is is r8 only activated by default on new projects or did the update include that change also to my already created project? If not how can I make use of it.

How to&Answers:

In Android Studio 3.4, R8 is used by default for all projects that don’t disable it.
You can switch to Proguard with:

  • android.enableR8 = false in gradle.properties; or
  • useProguard = true in your build.gradle.

In Android Studio 3.5, the useProguard flag has no effect. That means that R8 is always used, unless you add android.enableR8=false in gradle.properties.