4.26.1 - Android Export Error


I am trying my first project export for android. I am set up SDK for android. SDK and JDK was download using Android Studio. NDK is version r21e, because my previously used JDK for Unity was too old.

The problem Is when I am trying to Package Project for android. Then the unknown Error show up that you can see below on the image.

I am trying to solve the error for more than two weeks, but unfortunately without any progress.
Please what can I do for fixing the error? I am out of ideas.
Thank you

1 Like

I’ve gotten a similar issue trying to build for my quest 2 since it runs android and have been unable to fix it as well. I tried the source version of unreal which gives more detail on the errors, and finally fixed them by changing the java version to the one included in the android sdk folder, but now I have a separate set of errors that I cant figure out. tempted to just go back to 4.25 and creating a new blank project. luckily I haven’t done anything except create a blank project and test launching and packaging. I would be screwed otherwise.

This is interesting, I agree with SteelWB, I would also be definitely screwed. I hope someone gets around and answers this.

1 Like

So, I finally got it working. you need to install the jre version 8 from the internet (you will need a free oracle account to downlead that old version) and point the java environment to that and then and you have to manually download the correct ndk version, 21.0.6113669. you do that in android studio by going to configure > sdk manager > sdk tools > check Show Package Details and scroll down to NDK(Side by Side) and look for that version. once both were installed and unreal was pointed to the right place, it worked for me.

1 Like

I hope that might fix your issue since we both were having a similar issue

Now a days android development is growing day by day so many new features added . i also have my one project .

Hello. Thank you for the reply.
I tried to install java 8 and ndk version 20.0.6113669. I also changed the paths on the Android SDK page.
But unluckily the error appeared again.
Do have anyone any other option how to solve this error?
Thank you.

sometimes you will need to install all the android and jre stuff before installing unreal engine

another fix is making sure you only have arm v7 or arm64 selected in the android build settings

jdk-8u291-windows-x64 ( jre1.8.0_291 ) from Java SE Development Kit 8 - Downloads
android-ndk-r21e from NDK Revision History  |  Android NDK  |  Android Developers


It has worked for me just reinstalling jdk-8u291-windows-x64 (jre1.8.0_291)
Thank you!

I met the same problem with you, but I still couldn’t solve it after trying the above measures. I wonder if you have solved it :worried:

I’m going nuts trying to solve this error, has anyone tried anything else? I get the same error no matter what. ATHelper: Packaging (Android (ASTC)): ERROR: cmd.exe failed with args /c “D:\UNREAL\MyProject\Intermediate\Android\arm64\gradle\rungradle.bat” :app:assembleRelease

try on 4.25 or another computer. For me all the projects work on 4,25 but i am unable to find a fix for 4.26

I was encountering the same rungrandle.bat error in 4.26.2. I followed along with this YouTube video and I was able to build properly: https://www.youtube.com/watch?v=cLveaVXOKKc

I think he’s got another one for 4.26.0 if you’re running that.

Any solved build ?