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

2

31

I am new to flutter development.

When I opened my android project in android studio then I got this warning and unable to understand exactly what to do?

I have already read this but not clear to me.

Please tell exactly what to do? (Keep in mind I am new to flutter so be stepwise.)

Thermoluminescence answered 6/3, 2020 at 6:7 Comment(0)
J
53

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

Junna answered 9/3, 2020 at 3:12 Comment(4)
What is the difference between D8 and R8?Bethelbethena
#49549687Honeybunch
Is this change just for Darts?!Tobar
Thats works for me, just remove this line to avoid compilation errorsAccipitrine
E
0

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.

Epidemic answered 30/8, 2021 at 3:28 Comment(1)
Downgrading something is not a valid solutionIndissoluble

© 2022 - 2024 — McMap. All rights reserved.