I’m having a problem with not being able to build my unity projects to android. Whenever I try, I get a popup saying “Gradle Build Failed” and a couple of errors in the console:
/Applications/Unity/Hub/Editor/2020.3.30f1/PlaybackEngines/AndroidPlayer/OpenJDK/bin/java -classpath "/Applications/Unity/Hub/Editor/2020.3.30f1/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"```
and
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
WARN: /Users/me/Desktop/Programming/unity_projects/Stack It (No such file or directory): /Users/me/Desktop/Programming/unity_projects/Stack It
java.io.FileNotFoundException: /Users/me/Desktop/Programming/unity_projects/Stack It (No such file or directory)
Can anyone help fix this problem? Even after trying to install a different version of unity I can't get it to work.

For me it was having my project in an external drive, spent all day trying to fix this. Moved it to my documents folder, and the build ran flawlessly. Wish you luck!