I can't package a signed game to android play shop

So, my problem is, that if I check “For Distribution” checkbox in the project settings, UE fails to package to game. I checked this forum for solution, but none of them worked, since I am using only the blueprint editor and one of the solutions here was for visual studio, so it does not concern my case. I have changed the signingconfig.xml according to the keystore information.

Here is the error:

Program.Main: ERROR: ERROR: cmd.exe failed with args /c “C:\NVPACK\apache-ant-1.8.2/bin/ant.bat” -quiet release

RunUAT.bat ERROR: AutomationTool was unable to run successfully.

The workaround I have tried is to uncheck the “for distribution” in the editor and make the signing process in the command line. It could package an apk and I tried to sign it manually in the command line. However, it did not work, because the package is already signed, but I can’t upload this to google play of course, because the debugging is enabled. I have even tried that: android - jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compressed size (expected 463 but got 465 bytes) - Stack Overflow
Without any luck unfortunately.

All I want is to make a signed apk to upload to google play. I have been working on this for days. Please help!!

Update:
I have re-installed nvidia shield and installed visual studio. Now I am getting this error:

RunUAT.bat ERROR: AutomationTool was unable to run successfully.

I have checked the answerhub for solution and what I found is very disappointing: Packaging for IOS runUAT.bat error automation tool was unable to run successfully - Mobile - Epic Developer Community Forums
Are there really that many issues with packaging? Is there any way I could finally release my game?

Edit 1.: I am using 4.6.1 with a student license.

Edit 2.: I have also re-installed the engine and I have also tried 4.7.0, without any success. I couldn’t package the tappy chicken template either, so this is not a project specific issue.

Could anyone please help me?

Update:

The answer for this question caused at me a RunUAT.bat error with a blank project after a fresh re-install of the unreal engine 4.6.

Howdy Andras2014,

Thank you for posting this issue that you have been running into to. I have just tested this in the 4.6 build and the Preview Build and have been able to reproduce what you have been seeing. I have also tested this issue on our internal build and the issue is no longer occurring. At the this time, I am unsure as to when this fix will be implemented into the engine but a fix for this is right around the corner. I will be sure to keep you updated if I receive any more information on this fix.

Thanks and have a great day.

Hi Sean,

Thank you for your support.

I have just managed to make a signed apk and upload it to google play. It has taken me too many hours to figure out the cause of the problem, so in case you don’t mind, I would like to explain why it was terribly difficult to figure out the cause of the issue.

First of all, the runUAT.bat error doesn’t explain anything, there can be a lot of reasons why it fails to build the apk. (See above all.) It wasn’t clear to me, that the expression “failed with args” only occurs, if SigningConfig.xml isn’t setup properly.

Secondly, I realized it only later, that there is one more SigningConfig.xml file under C:\Program Files\Epic Games\4.6\Engine\Build\Android\Java , which (maybe?) needs to be set up as well.

Finally, - and that is what has solved my problem - you can’t really add file path in the SigningConfig.xml. It just won’t work.

keystore: “The file can be stored in this directory, or you may give it a path to another location.” After I copied my keystore file to all locations where a SigningConfig.xml exists, it worked fine.

I hope I could help anybody with this short text, because I think that there is not enough information about this topic.

So I am happy I could work it out. I will be testing my game very soon.

Howdy Andras,

Glad to here that you were able to find a workaround for this issue. Please be sure to let me know how the the testing of your game goes.

Thanks and have a great day!

Andras2014, do you can share with your SigningConfig.xml and keystore? i just want to check some things

I am sorry, but I won’t share it, because it is a digital signature, I am not allowed to do that. You can generate one in the command line. Place it in the YourProjectName/Build/Android and then modify SigningConfig.xml with e.g notepad ++. Keyalias is just the name, but the keystore needs .keystore at the end.

I hope I have helped you with that.