Showing results for 
Search instead for 
Did you mean: 

Error when building unity project

I'm using Unity 2021.3.16 and whenever I try to build and run my unity game to my headset, I get this error

> Configure project :launcher
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8

I followed every step in this so I don't know what the issue is. I've looked online but they all pretty much say the same thing (to use custom gradle file and edit it slightly. Did that but didn't help.)