Android Package- Build Fail

I’ve seen a handful of questions posed regarding this same topic and as I’ve tried almost every single solution, none of them have worked. Anyway,I’m using UE 4.8.2 and am trying to package a blueprint-based app for shipping to Android. However, when I try to package it it always fails. What I have done so far:

  • installed VS 2013 Express desktop and ensured it’s communicating with UE4.8.2
  • installed latest TADP including: SDK 19, JDK 1.6, NDK r9c, ANT 1.8.2 (tried uninstalling and reinstalling TADP multiple times)
  • set up correct environment variables
  • set up SDKconfig correctly (in project settings)
  • created keystore and placed it in …"project"\Build\Android folder
  • filled out DistributionSigning with the corresponding keystore info (in project settings)

I’ve also tried to package the stock Tappy Chicken “for distribution” and that will fail as well.
Here are the for both of the “for distribution” packaging attempts.

I’m packaging both of these apps for distribution selecting the Android (ETC-1).
Please help!


UPDATE 1:

I was able to open up my project in Visual Studio and attempted a build using “Local Windows Debugger” for “Development” on “Android”. After this failed, I tried again to package it with the Engine for a second time (Android ETC1). Although this of course failed again, it seemed to get further in the packaging process. Below are the for both of the attempts:

Just some log highlights and my own observations:

The problem seems to lie within:

>  BUILD FAILED
> C:\\android-sdk-windows\tools\ant\build.xml:720: The following error occurred while executing this line:
> C:\\android-sdk-windows\tools\ant\build.xml:734: Compile failed; see the compiler error output for details.

and

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command ""C:\Program Files\Epic Games\4.8\Engine\Build\BatchFiles\Build.bat" RumRunners1 Android Development "C:\Users\bill.wilkins\Documents\Unreal Projects\RumRunners1\RumRunners1.uproject" -rocket" exited with code -1.

Both seem to stem from improper TADP installation, but I have uninstalled and reinstalled the SDK, NDK, JDK, and ANT multiple times. I have no idea!!! Again, any help will be greatly appreciated. Also, what the heck is the “error code -1” associated with the “Error MSB3073”?


UPDATE 2:

I tried looking into the components of the “build.xml” to see which lines of code had failed and it was some line calling the function “need.javac.fork”. I tried to look more into those problems was hopelessly lost shortly after. My next option was to restart entirely by setting up UE4.8.3, VS 2013, my project, and the entire TEDP on a different computer and tried to package again, but still get the exact same errors. Aside from the two blocks listed above in “UPDATE 1”, another one to highlight possibly is:

Error	11	error : cmd.exe failed with args /c "C://apache-ant-1.8.2/bin/ant.bat" debug	C:\Users\RDubbz\Documents\Unreal Projects\RumRunners1\Intermediate\ProjectFiles\UnrealBuildTool Exception	RumRunners1

I’d appreciate any direction someone could point me in.


UPDATE 3:

Just ran “ant debug” command from the command prompt on my “build.xml” file and my “ant.bat” file. Here’s what I got:

  • Build.xml:

    Buildfile: C:\android-sdk-windows\tools\ant\build.xml
    [taskdef] Could not load definitions from resource anttasks.properties. It cou
    ld not be found.
    [taskdef] Could not load definitions from resource emma_ant.properties. It cou
    ld not be found.

    -set-mode-check:

    -set-debug-files:

    -check-env:

    BUILD FAILED
    C:\android-sdk-windows\tools\ant\build.xml:396: Problem: failed to create
    task or type checkenv
    Cause: The name is undefined.
    Action: Check the spelling.
    Action: Check that any custom tasks/types have been declared.
    Action: Check that any / declarations have taken place.

    Total time: 0 seconds

  • anttasks.properties and emma_ant.properties seem to both be correctly defined inside the build file, and both files they reference are properly installed so idk why it’s not finding them!

  • Ant.bat:

    Buildfile: C:\apache-ant-1.8.2\bin\ant.bat

    BUILD FAILED
    C:\apache-ant-1.8.2\bin\ant.bat:1: Content is not allowed in prolog.

    Total time: 0 seconds

  • No idea what this means

Again, any help would be appreciated!

I’m getting this exact same problem!

Hey Wilkinsbud,

After reviewing your , it looks as though your compiler isn’t up to date:

[javac] warning: com\\android\gms\ads\AdView.class(com\\android\gms\ads:AdView.class): major version 51 is newer than 50, the highest major version supported by this compiler.

Once you’ve done that, please delete your Intermediate, Saved and Cofig files from your project folder while the project is closed. Make sure you delete your Android/src folder out of your Builds folder too.

Once you’ve done that, please reply back and let me know how your project is reacting, upload the new if you’re still running into any errors.

It worked! Oh my gosh thank you so much !
The reason I hadn’t investigated too much into those javac errors is because in the log it said “note: it’s safe to ignore javac obsolete warnings”. But that combination of changing to jdk 1.8 and deleting those files did it! Thank you so much again!

You’re welcome, please let us know if you run into any further complications. :slight_smile:

This works for me also. Why didn’t I try this first? Thanks!

I can’t believe it, it worked for me too! I worked on this build fail for about 3 hours last night, then came across this, and did it and it worked! Thank you so much!

OMG you are an absolute Legend Thank you :') you saved my life…

Hey! for me it not worked! please help

[my log][1]

LogPlatformFile: Not using cached read wrapperLogInit:Display: RandInit(-17289 - Pastebin.com

please help!

Looks like you’re having SDK trouble. Please submit your own question to AnswerHub so that we can further assist you.

Thanks!

Thanks this worked for me as well! Installed proper API levels 19-24, checked environment variables, android sdk paths in project, then finally deleted intermediate, saved, and config folders as well as Android src folder in build and finally it builds successfully!!! Thank you thank you!!!

You’re welcome!

Hi , apparently this issue is a common thing, can you elaborate which compiler should be updated and just can you point me out to how?
Is it the JDK or the Visual Studio compiler or the incredibuild…etc.
Thanks in advance