Error while deplyoing/packaging project

Hi all! I’m experiencing an issue while trying to launch a project on my device, or packaging it. These are the last lines of the output log:

UATHelper: Packaging (Android (ETC1)): Creating rungradle.bat to work around commandline length limit (using unused drive letter Z:)
UATHelper: Packaging (Android (ETC1)): Making .apk with Gradle…
UATHelper: Packaging (Android (ETC1)): ERROR: C:\WINDOWS\system32\cmd.exe failed with args /c “E:\Unreal Projects\AndroidProj2\Intermediate/Android/APK\gradle\rungradle.bat” :app:assembleDebug
UATHelper: Packaging (Android (ETC1)): (see C:\Users\Asus\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+UE_4.22\Log.txt for full exception trace)
PackagingResults: Error: C:\WINDOWS\system32\cmd.exe failed with args /c “E:\Unreal Projects\AndroidProj2\Intermediate/Android/APK\gradle\rungradle.bat” :app:assembleDebug
UATHelper: Packaging (Android (ETC1)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Android (ETC1)): BUILD FAILED
PackagingResults: Error: Unknown Error

I followed the Android Quick Start Guide, connected my device in Dev Mode (which I can see by adb devices and through Unreal), I installed what needed. But still something goes wrong.
Any idea?
Thanks!

Up.
Nobody had similar issues? I have already tried many workaround taken from the web :frowning:

This too is driving me nuts. Not a single solution on the web (and I have tried MANY) works.

Check to accept sdk tab in Android settings pressed or not, I have not been pressed and therefore gave such an error. And if this does not fix the error, change the file keystore because if there is an error in the keystore file then this also leads to this error.

Hi guys,
i had the same issue trying to deploy package for android after changing my ndk version.
i followed the path to the “rungradle.bat” file and double click on it, it runs some commands. after this operation i succeed deploying the package.

1 Like

Same issue here, Running the bat file did not help

I got around this by deleting all of the folders in my project folder except for Config and Content. I have a blueprint project, but if you had C++ you also wouldn’t want to delete source. I found my frequent launches onto the Quest prove very finicky, and doing this resolved some of the crashes.