You are missing the recommended Gradle. Install the recommended version using Unity Hub

Hello, I installed the Unity 2021.3.6

Apparently Unity HUB doesn’t install Gradle when I add the Android Module.
EDIT: It’s OK on Windows but I got this problem on OSX only.
You can see screenshots of my installation.
(Can’t upload files)

I had a similar solution to @plotlessplot.

Using windows explorer navigate to C:\Program Files\Unity\Hub\Editor\2021.3.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\cmdline-tools\2.1 and copy the entire contents. (I copied, not cut. Don’t copy 2.1. Open it and copy the contents.)

Then navigate to C:\Program Files\Unity\Hub\Editor\2021.3.6f1\Editor\Data\PlaybackEngines\AndroidPlayer and create a folder called Tools.

Open your new Tools folder.

Past the contents of 2.1 into that folder.

Back in Unity > Edit > Preferences > External Tools > Untick Gradle Installed with Unity (recommende) and then tick it again. Removed the error.

No idea what other destruction I have wrought in the meantime.

Good Luck.

I copied the Tools folder (C:\Program Files\Unity\Hub\Editor\2021.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer) into the 2021.3.6f AndroidPlayer folder, ticked and unticked the “Gradle Installed with Unity (recommended)” box in Preferences/External Tools and that fixed the issue.

It seems Gradle is indeed installed with the latest version of the Editor, but in a different folder.

What worked for me was moving the contents of the new installation path (/2021.3.6f1/PlaybackEngines/AndroidPlayer/SDK/cmdline-tools/2.1) to the folder that Unity is actually looking at (/2021.3.6f1/PlaybackEngines/AndroidPlayer/SDK/Tools).

After that, building for Android works as usual. Hopefully, they’ll address this in 2021.3.7f1 or earlier through a Hub update.

I’m having the same issue on Windows for Unity 2021.3.6f1, even tried uninstalling hub and reinstalling with no luck.

Having the same problem, even after a fresh reinstall.

On macOS it seems the issue is the Tools directory and contents are missing from /Applications/Unity/Hub/Editor/2021.3.6f1/PlaybackEngines/AndroidPlayer/

I had 2021.3.5f1 installed, so I copied /Applications/Unity/Hub/Editor/2021.3.5f1/PlaybackEngines/AndroidPlayer/Tools to
/Applications/Unity/Hub/Editor/2021.3.6f1/PlaybackEngines/AndroidPlayer/

dependencies {
// If you are changing the Android Gradle Plugin version, make sure it is compatible with the Gradle version preinstalled with Unity
// See which Gradle version is preinstalled with Unity here Unity - Manual: Gradle for Android
// See official Gradle and Android Gradle Plugin compatibility table here Android Gradle plugin release notes  |  Android Studio  |  Android Developers
// To specify a custom Gradle version in Unity, go do “Preferences > External Tools”, uncheck “Gradle Installed with Unity (recommended)” and specify a path to a custom Gradle version
classpath ‘com.android.tools.build:gradle:4.0.1’
BUILD_SCRIPT_DEPS
}

I thiink it
" classpath ‘com.android.tools.build:gradle:4.0.1’"
It is good.