Changing the JDK to 17 worked for me (UE_5.3).
Followed all steps on the documentation. After that I get the “Could not resolve com.android.tools.build:gradle:7.4.2” error.
So I changed the SetupAndroid.bat to latest instead of 8.0
In AndroidStudio I installed Command-line Tools (latest) 11.0
SDK Manager/SDK Tools/ Also needed to check Show Package Details
Don’t know if that step is necessary to be honest
Installed JDK17
Changed the JAVA_HOME environment variable to the install location of the JDK17
(mine was "C:\Program Files\Java\jdk-17")
Run the SetupAndroid.bat
Now I can package Android normally.