UE 5.2: cmd.exe failed with args rungradle.bat :app:assembledebug

I am having a consistent error when trying to package my project and I cannot find a tutorial which gives a solution for this problem with UE 5.2 (I found some for UE4, but they do not work for me). I managed to package a VR template project, but cannot do so with my personal one, so I do not know what the problem is.
I have installed Android Studio 4.0, Nvidia Codeworks 1R7, Visual Studio 2022, and JDK 8U301. I am currently using Android SDK API 32.
The error says: cmd.exe failed with args /c “P:…\ProjectName\Intermediate\Android\arm64\gradle\rungradle.bat” :app:assembleDebug

Any help will be appreciated and let me know if you need additional info!

Can you provide additional informations from the error logs ? Does it say “The batch file cannot be found” before the error messages ?