Problem
When building the game you are creating in Unity, the process fails in phase “Building Gradle Project”

Possible errors


Solution implemented
From folder :
C:\Program Files\Unity\Hub\Editor\2022.3.46f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK
Remove all versions of SDK named android-xx
- Restart Unity
- In Files –> Build Settings –> Player Settings –> Other Settings –> Target API Level select API 34 (or recommended one)
- Press Build & Run
- Powershell (blue window) will open and will install the API level 34 (need administrator rights)