build.gradle: The option 'android.enableR8' is deprecated and should not be used anymore build.gradle: The option 'android.enableR8' is deprecated and should not be used anymore android android

build.gradle: The option 'android.enableR8' is deprecated and should not be used anymore


Step 1:

Open the gradle.properties file

**Android Studio File Structure**

Step 2:

Disable android.enableR8=true by adding a # in front:

#android.enableR8=true

Alternatively, you can swap out the R8 for D8, The build system changed to using D8 instead of R8.

android.enableD8=true


For me, after spending a whole day on it, I solved it by downgrading to JDK 8 and I have previously tried it with embedded JDK and JDK 16.