[HELP] Android\arm64\gradle\rungradle.bat ERROR HELL

Just some extra info, notice this error here…

UATHelper: Packaging (Android (ASTC)): Build-tool 31.0.0 is missing DX at C:\Users\rober\AppData\Local\Android\Sdk\build-tools\31.0.0\dx.bat

I get this same exact error every time I install it…apparently either Unreal is expecting d8.bat and d8.jar to be named dx.bat and dx.jar or the installation for the build-tools is screwing up the naming convention…

I actually was able to fix this error just by duplicating those files and re-naming them. If you check the Github repository bug reports there is actually a thread that was opened specifically inquiring about this and reporting it as a bug. This wasn’t even reported as a bug for Unreal, it was reported by coders that use this build tool outside of Unreal.

i can fix this error send message in facebook page to fix it : Code Prof

1 Like

i can fix this error send message in facebook page to fix it : Code Prof

1 Like

Do you have a link to that github repository bug report? Can’t seem to find it and I’d be interested in reading it.
Cheers!

I’ll see if I can find it again

Here I believe this was it right here: Android build fails with Android SDK Build-Tools 31.0.0 · Issue #1288 · apache/cordova-android · GitHub

Appreciate, friend. No worries if you can’t find it though, I just found a couple of alternate posts on stack-overflow giving a bit of insight into it. Seems like its just a simple name mix-up on the SDK build toolchain.
Took me a while to figure this out but everything is working now!

Yeah It’s odd though, the bug is easily replicated.

Thank you for this tip. To add an additional help might be AFTER REMOVING THE CORRUPTED version from SDK Tools + to also delete the folders INTERMEDIATE - SAVED - BINARIES before trying a new build.

1 Like

Thank you very much! Worked!

1 Like

Warning: These solutions do not work with Unreal 5.0

This is not work for me when I try Android SDK Build Tools 33.0.0-rc2.
Then I try kenjikr’s solution in this discussion thread (using 30.0.3).
When I can build android apk with 30.0.3,then I remove 30.0.3 and install the 33.0.0-rc2, finally I can build andoird apk with 33.0.0-rc2.
I don’t know why , but it works for me. :clinking_glasses:
(My unreal Version is 4.27.2)

I just renamed d8.bat to DX and it worked

1 Like

Digging and digging through forum posts I have tried as many of the solutions (and youtube videos) as I could but I still can’t get UE5 to build to android. Has anyone lately gone through and successfully built a project to android without the gradle / intermediate errors?

Ok so I finally got it working. Turns out the final thing that I changed to get it working was to download the android 33.0.0-rc3 (-rc2 didn’t seem to be available anymore).
Now the project builds without errors and works on my samsung phone.

well. get this error message in my work:
Build-tool 33.0.0 is missing DX at E:\android-toolchain\as-sdk\Sdk\build-tools\33.0.0\dx.bat

The only way works for me is to remove all version of build tools greater than 30.0.3

final like this:

图片


how i can fix it


Plz help me out with this error. This error comes while packaging the game in android.

This error also pops up when the value ‘MyKey’ is not ‘MyKey’. If you follow this Key tutorial, you see where the value ‘MyKey’ is set Signing Android Projects for Release on the Google Play Store with Unreal Engine | Unreal Engine 5.0 Documentation

The ‘MyKey’ issue is apparent after the build shutdown and above the error you find this:

FAILURE: Build failed with an exception.
UATHelper: Packaging (Android (ASTC)): * What went wrong:
UATHelper: Packaging (Android (ASTC)): Execution failed for task ‘:app:packageRelease’.
UATHelper: Packaging (Android (ASTC)): > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
UATHelper: Packaging (Android (ASTC)): > com.android.ide.common.signing.KeytoolException: Failed to read key Key from store “D:\MyProject\Intermediate\Android\arm64\ExampleKey.keystore”: No key with alias ‘Key’ found in keystore

You deserve a medal good sir.