Android Packaging fails every time

When I first set this project up I couldn’t package for android because I didn’t have all of the required tools installed so I went in and installed the AndroidWorks program and installed everything through there that it would allow me to install, then I was able to package my project and when I tried to upload the .APK to the my google play developer account it stopped me with a warning that it had debug files and was therefore not allowed, so I followed yet another guide saying to tick the check box for distribution and that would remove the debug files so that it could be uploaded to google play, Now that I have that check box ticked however, every time I try to package my project it fails. Is it just not possible to actually package a project from UE4 that is able to be uploaded to the Google Play store?

Can you post the log that shows the error?

link text

And like I said, packaging worked fine before, it just could not be uploaded to my developer console for google play because it had debug files in it and the only thing that got changed between it working and not working was ticking the check box for distribution in the package settings in order to remove the debug files so that I could upload it.

Here’s a very similar issue…

The error logs indicate some .jar isn’t being found.

[2017.05.25-19.51.41:741][123]UATHelper: Packaging (Android (ATC)): C:\NVPACK\android-sdk-windows\tools\ant\build.xml:871: Can't read [C:\NVPACK\android-sdk-windows\platforms\android-25\android.jar] (Can't process class [java/text/CollationElementIterator.class] (Unsupported class version number [52.0] (maximum 51.0, Java 1.7)))

Here’s another similar issue: Are you using Java 1.7? Try using to 1.8.

I was already using Java 1.8, tried rolling it back to 1.7 and the packaging still fails, I checked the directory where that .jar is and it is definitely there so I am not sure why its not able to read it, I updated Java back to 1.8 after it failed to package with 1.7 and it fails with the same error, unchecked the “For Distribution” check box in the packaging settings and it succeeds with the build again, but without that checkbox ticked the .APK generated will not be able to be uploaded to the google play store. I will keep looking into it myself as well and post any answers I find here in case anyone else runs into this problem.

You probably already know this but the JDK that UE uses is in the project settings. Is the error exactly the same with 1.8 and 1.7?

Exact same error regardless of which version of Java I had installed at the time of packaging, and yes I did know where the JDK UE uses was located and updated to directory accordingly when I changed versions. There are a couple more things I am going to try tonight before I call it a night and get some sleep but so far the only thing that seems to make any difference at all is whether the “For Distribution” check box in the Package Settings is checked or not. If it is not checked the build is successful, if it is checked the build fails.

Hopefully you’re on to something with that check box. I’ll do some searching for you while I wait on my android project to package between tests.

So far I have tried CodeWorks 1R4,1R5, and 1R6 with Java 1.7 and 1.8 and tried with and without doing a full rebuild on packaging, I get the same error every time unless For Distribution is unchecked. and with that I think I am going to call it a night since I have been fighting with this for over 24 hours and made no progress so far in getting my project packaged with a usable .APK, I also think it worth noting that I can package it as a shipping build successfully with for distribution unchecked, but again with that box unchecked it apparently includes some debug files regardless of whether shipping or development build is selected and regardless of whether “Include Debug Files” is checked or not which prevents the resulting .APK from being uploaded to the Google Play Developer Console.

I ended up uninstalling codeworks entirely, deleting the intermediate and saved folders of the project, deleting all of the build folders, shutting down my PC, reinstalling codeworks, rebuilding the project, packaging as a development build not for distribution, then trying a for distribution shipping build again, it cleared that error I was getting but now I am running intro a whole new problem that I posted a new quesiton for.