x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Android project name causes ant.bat error

Hi, sorry for my bad english, i am italian...I have a problem when i try to package my android game...the error is this:

 *MainFrameActions: Packaging (Android (ETC1)): ====28/05/2015 20:13:28====PERFORMING FINAL APK PACKAGE OPERATION================================================
 MainFrameActions: Packaging (Android (ETC1)): UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Making .apk with Ant... (note: it's safe to ignore javac obsolete warnings)
 MainFrameActions: Packaging (Android (ETC1)): BUILD FAILED
 MainFrameActions: Packaging (Android (ETC1)): C:\NVPACK\android-sdk-windows\tools\ant\build.xml:653: The following error occurred while executing this line:
 MainFrameActions: Packaging (Android (ETC1)): C:\NVPACK\android-sdk-windows\tools\ant\build.xml:698: null returned: 1
 MainFrameActions: Packaging (Android (ETC1)): Total time: 8 seconds
 MainFrameActions: Packaging (Android (ETC1)): BuildCommand.Execute: ERROR: BUILD FAILED
 MainFrameActions: Packaging (Android (ETC1)): Program.Main: ERROR: AutomationTool terminated with exception:
 MainFrameActions: Packaging (Android (ETC1)): Program.Main: ERROR: Exception in UnrealBuildTool: ERROR: cmd.exe failed with args /c "C:/NVPACK/apache-ant-1.8.2/bin/ant.bat" -quiet release
 MainFrameActions: Packaging (Android (ETC1)): Stacktrace:    in UnrealBuildTool.Android.UEDeployAndroid.RunCommandLineProgramAndThrowOnError(String WorkingDire
 MainFrameActions: Packaging (Android (ETC1)): ctory, String Command, String Params, String OverrideDesc, Boolean bUseShellExecute)
 MainFrameActions: Packaging (Android (ETC1)):    in UnrealBuildTool.Android.UEDeployAndroid.MakeApk(String ProjectName, String ProjectDirectory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bMakeSeparateApks, Boolean bIncrementalPackage, Boolean bDisallowPackagingDataInApk)
 MainFrameActions: Packaging (Android (ETC1)):    in UnrealBuildTool.Android.UEDeployAndroid.PrepForUATPackageOrDeploy(String ProjectName, String ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bIsDataDeploy)
 MainFrameActions: Packaging (Android (ETC1)):    in AndroidPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL)
 MainFrameActions: Packaging (Android (ETC1)):    in Project.Package(ProjectParams Params, Int32 WorkingCL)
 MainFrameActions: Packaging (Android (ETC1)):    in BuildCookRun.DoBuildCookRun(ProjectParams Params)
 MainFrameActions: Packaging (Android (ETC1)):    in BuildCommand.Execute()
 MainFrameActions: Packaging (Android (ETC1)):    in AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
 MainFrameActions: Packaging (Android (ETC1)):    in AutomationTool.Automation.Process(String[] CommandLine)
 MainFrameActions: Packaging (Android (ETC1)):    in AutomationTool.Program.MainProc(Object Param)
 MainFrameActions: Packaging (Android (ETC1)):    in AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param)
 MainFrameActions: Packaging (Android (ETC1)):    in AutomationTool.Program.Main()
 MainFrameActions: Packaging (Android (ETC1)): Program.Main: ERROR: ERROR: cmd.exe failed with args /c "C:/NVPACK/apache-ant-1.8.2/bin/ant.bat" -quiet release
 MainFrameActions: Packaging (Android (ETC1)): ProcessManager.KillAll: Trying to kill 0 spawned processes.
 MainFrameActions: Packaging (Android (ETC1)): Program.Main: AutomationTool exiting with ExitCode=1
 MainFrameActions: Packaging (Android (ETC1)): Domain_ProcessExit
 MainFrameActions: Packaging (Android (ETC1)): ProcessManager.KillAll: Trying to kill 0 spawned processes.
 MainFrameActions: Packaging (Android (ETC1)): copying UAT log files...
 MainFrameActions: Packaging (Android (ETC1)): RunUAT.bat ERROR: AutomationTool was unable to run successfully.
 MainFrameActions: Packaging (Android (ETC1)): BUILD FAILED*

I tried different solutions how: -Unistall and reinstall Unreal Engine and TADP -Install TADP 4.0r1 -Install only API19 (i read this in a post here) (The path in Project Setting-Android SDK-SDK Config are right...) But the problem seems to be apache ant...(i tried also with the last versione apache-ant-1.9.4 and nothing...) So help me please i don't know what to think!

Product Version: UE 4.7
Tags:
more ▼

asked May 28 '15 at 06:25 PM in Packaging & Deployment

avatar image

Baziga
46 3 5 7

avatar image Samantha Sutton ♦♦ STAFF May 28 '15 at 08:27 PM

Hey Baziga,

Which version of the Editor are you working within? Could you please see whether or not you're able to package any other project from this version of the Engine? I suggest for you to download Tappy Chicken and package for ETC1 in development. If you're able to package that, then it's not TADP.

Please provide me the error logs from your original project and also please provide me any additional error logs that you receive when trying to package Tappy Chicken out.

Looking forward to hearing back from you, thanks!

avatar image Baziga May 28 '15 at 08:36 PM

Hi Samantha, I'm work with Unreal 4.7.6...It's strange, i tried with Tappy Chicken and the packaging has been successful...I tried again with the same configuration of Tappy Chicken and nothin, don't work... Thank you!

The file log

log.log (1.8 MB)
avatar image wittlief ♦♦ STAFF Jun 02 '15 at 01:49 PM

Hi Bazinga,

From your logs it looks like you've got the SDK still set to 'android 21', you'll want to set that to 'android 19'. That is not causing your build failure, but it will cause your project to not work on devices with less than Android OS 5.0.

Next, please roll back to the apache-ant-1.8.2, and make sure that your editor's project settings Platforms-Android SDK setup looks like this screenshot. It may be that properly set up the newest version of Apache should work, but when people have problems with it (and from your logs it looks like Ant is where it fails every time) I usually recommend they go back to the one we know the engine works on. Then restart your computer as you have changed your SDK.

Further, have you set up your environment variables according to this documentation? I am assuming so since you were able to package Tappy, but this is just to remove all possible problems.

Once you check these things, please try to package Tappy for development and ETC1 one more time, and then your project regardless of whether Tappy fails or succeeds, and include both sets of output logs here as a txt file.

Good luck!

avatar image Baziga Jun 02 '15 at 02:37 PM

Hi wittlief! Thank for your answer! The environment variables and the editor's project settings are right setup. The packaging of Tappy Chicken in development mode has been succesful, in shipping mode no...And my project both in development mode and shipping mode no... I understand the problem, but I do not know how to fix it...The problem is with:

 C:\NVPACK\android-sdk-windows\tools\ant\build.xml:649: The following error occurred while executing this line:
 MainFrameActions: Packaging (Android (ETC1)): C:\NVPACK\android-sdk-windows\tools\ant\build.xml:694: null returned: 1

It is not a problem with Unreal Engine, this problem have many people on the internet I read, just do not understand how solve...because I do not use their programs...

Update: The problem is also: ERROR: cmd.exe failed with args /c "C:/NVPACK/apache-ant-1.8.2/bin/ant.bat" -quiet release

This is the new file log:

log.log (906.0 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Yes, it's not specific to UE which makes it infuriatingly hard to diagnose, and your logs are mostly error free but the ant.bat one, which also makes it even tougher. Sometimes it's something as small and impossible to find as a space in something that isn't supposed to be there.

Here's some more things you can try:

Since you're mostly having problems with shipping/distribution builds, double check that you have your keystore set up, it is necessary for distribution.

Make sure to try this one, just to be on the safe side.

I don't see any proguard errors in your logs, but just in case here are two threads wherein proguard was the problem and how it was fixed.

Lastly, you can delete your current build of TADP and upgrade to the most recent. Just make sure you have SDK 19 and NDK checked when installing.

So, good luck! Sorry I can't be more specific on this one.

more ▼

answered Jun 02 '15 at 07:14 PM

avatar image Baziga Jun 03 '15 at 04:06 PM

I solved finally! You said well, It was something as small and impossible to find, because I thought that the problem was TADP or apache ant...The problem was in Project-Android -> Android package name....I had written the title of my game between "[ ]"....Now i can package my game finally! I hope this thread will be useful to someone else! Thank you so much wittlief for the help and the patience!

avatar image wittlief ♦♦ STAFF Jun 03 '15 at 04:13 PM

Hooray!

Let us know if you have any other problems.

avatar image raf_oliv Nov 28 '16 at 01:52 PM

Small and impossible. That exactly my issue. TKS saved my life today!!!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Wait, when you see "com.YourCompany.[PROJECT]", you're not suppose to put your name in the "PROJECT" part??

more ▼

answered Jun 16 '15 at 04:01 AM

avatar image

MaxSMoke777
138 14 17 37

avatar image Baziga Jun 16 '15 at 08:58 AM

Maybe I wrote wrong, because i don't know the english, i have put the name in [Project], but i have put also the bracket square with the name... and this caused error build with apache ant!

avatar image MaxSMoke777 Jun 16 '15 at 01:37 PM

So the square brackets aren't suppose to be in there? Could you show me an example of how it's suppose to be done? I'm feeling more confused.

avatar image Baziga Jun 16 '15 at 01:57 PM

In Android Package Name, you must write (Example):

com.MaxSMoke777.nameofyourgame <--- without square brackets

I don't know what is your developer name, I have put your nick in the example...

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question