I know this question has been taken up on the internet forums but none of them have a proper solution that works. I have a game made for android for years but cannot even package it as an apk. Been trying to figure it out for weeks now !

This is the error that I keep getting : UATHelper: Packaging (Android (DXT)): ERROR: cmd.exe failed with args /c "C:\Users[PC NAME]\Documents\Unreal Projects\Teleport 4.24\Intermediate\Android\APK\gradle\rungradle.bat" :app:assembleDebug

Things I have tried (after searching solutions on internet)

Making Sure I accepted the SDK Liscence

Downloading and Installing Android-28 (as the compiler said it was needed and recommended, and sdk installed has upto Android-26 api level only)

Making sure firewall or Antivirus is not blocking UE4

Changing apk name

Installing and running with ndk-16b and ndk-18b (newer versions)

Installing Gradle 4.6 (newer gradle version)

Deleting gradle cache file

Deleting the intermediate folder in project file and then compiling (it comes back with same error)

Please Note : Earlier when I did android development with UE4V18.1 , I still had problems with gradle so i used 'ant' instead. But now that ant has become obsolete, I don't have that option. Kindly help me, I can't waste any more time on just packaging.