UE4 rungradle.bat unknown error

Hi!

My problem is starting to drive me crazy. When I try to launch my project on my phone or just packaging my app, I will get the following error:

UATHelper: Packaging (Android (ETC2)): ERROR: C:\WINDOWS\system32\cmd.exe failed with args /c "H:\Projects\Private\Projects\Programozas\Game\MyProject3\Intermediate/Android/APK\gradle\rungradle.bat" :app:assembleRelease
UATHelper: Packaging (Android (ETC2)):        (see C:\Users\stark\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+Unreal+UE_4.22\Log.txt for full exception trace)
UATHelper: Packaging (Android (ETC2)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Android (ETC2)): BUILD FAILED
PackagingResults: Error: Unknown Error

I accepted the Android SDK License thing, I successfully created a .keystore file too. I have all of the Standard NVPACK tools installed too.

Please help!

Hello - if anyone is coming back to this issue, I managed to solve it by closing UE4 → deleting my Intermediate folder → Opening it again and launching on mobile.

there is no need to delete the entire folder.

Only the gradle folder inside the intermediate (in my case compiling for android - ARM64 )