(Q&A) How to solve the gradle wrapper issue for packaging (UE 5-01)

Hi All,

I have the following when packaging the apk.

UATHelper: Packaging (Android (ASTC)): Making .apk with Gradle…
UATHelper: Packaging (Android (ASTC)): Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
UATHelper: Packaging (Android (ASTC)): ERROR: cmd.exe failed with args /c “C:\Users\steve\OneDrive\文件\Unreal Projects\MyProject4\Intermediate\Android\arm64\gradle\rungradle.bat” :app:assembleDebug
UATHelper: Packaging (Android (ASTC)): (see C:\Users\steve\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.0\Log.txt for full exception trace)
UATHelper: Packaging (Android (ASTC)): AutomationTool executed for 0h 0m 15s
UATHelper: Packaging (Android (ASTC)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Android (ASTC)): Updating environment variables set by a Turnkey sub-process
UATHelper: Packaging (Android (ASTC)): The system cannot find the path specified.
UATHelper: Packaging (Android (ASTC)): The system cannot find the path specified.

It would be great if anyone can shed me some light on this.

Thanks,
Steve

1 Like

i have the same error Error: Could not find or load main class org.gradle.wrapper if you find the answer plz do tell me this is so hard _