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"

UE 4.7.2 can't pack .apk with Ant

Hey guys! My head is about to blow already, I've googled a lot of similar questions, but yet found no solution. I'm trying to build an android app with UE 4.7.2. And when it comes to final apk creation with Ant, the operation fails. Actually, I'm totally sure it's not my project problem, because it's a totally new built-in top down solution with starter content. I didn't change or add anything to it, just for the sake of clarity of experiment. I have installed everything according to this instruction https://docs.unrealengine.com/latest/INT/Platforms/Android/GettingStarted/1/index.html I'm absolutely sure of all the environment variables from HAVA_HOME to ANT_HOME and other stuff. They're all set up correctly. And also I have set everything up at project properties -> android / android sdk tabs But for some reason UE can't start AutomationTool succesfully referencing to some problems at 720 and 734th lines of build.xml. I'm pretty certain it's some minor problem which I'm just missing. But since I'm new to UE, I can't seem to find it myself. So, can anyone point me in the right direction, please?

Here's the part of log where the problems start https://dl.dropboxusercontent.com/u/25927940/log.txt p.s. my OS is Windows 7 x64 professional. Hardware's Intel Core i5 (2.50) + 8 Gb RAM

Here's the part where it starts to complain about build.xml

 MainFrameActions: Packaging (Android (All)): BUILD FAILED
 MainFrameActions: Packaging (Android (All)): C:\NVPACK\android-sdk-windows\tools\ant\build.xml:720: The following error occurred while executing this line:
 MainFrameActions: Packaging (Android (All)): C:\NVPACK\android-sdk-windows\tools\ant\build.xml:734: Compile failed; see the compiler error output for details.
 MainFrameActions: Packaging (Android (All)): Total time: 23 seconds
 MainFrameActions: Packaging (Android (All)): BuildCommand.Execute: ERROR: BUILD FAILED
 MainFrameActions: Packaging (Android (All)): Program.Main: ERROR: AutomationTool terminated with exception:
 MainFrameActions: Packaging (Android (All)): Program.Main: ERROR: Exception in UnrealBuildTool: ERROR: cmd.exe failed with args /c "D:/apache-ant-1.9.0/bin/ant.bat" -quiet debug
 MainFrameActions: Packaging (Android (All)): Stacktrace:    at UnrealBuildTool.Android.UEDeployAndroid.RunCommandLineProgramAndThrowOnError(String WorkingDirectory, St
 MainFrameActions: Packaging (Android (All)): ring Command, String Params, String OverrideDesc, Boolean bUseShellExecute)
 MainFrameActions: Packaging (Android (All)):    at 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 (All)):    at UnrealBuildTool.Android.UEDeployAndroid.PrepForUATPackageOrDeploy(String ProjectName, String ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bIsDataDeploy)
 MainFrameActions: Packaging (Android (All)):    at AndroidPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL)
 MainFrameActions: Packaging (Android (All)):    at Project.Package(ProjectParams Params, Int32 WorkingCL)
 MainFrameActions: Packaging (Android (All)):    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
 MainFrameActions: Packaging (Android (All)):    at BuildCommand.Execute()
 MainFrameActions: Packaging (Android (All)):    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
 MainFrameActions: Packaging (Android (All)):    at AutomationTool.Automation.Process(String[] CommandLine)
 MainFrameActions: Packaging (Android (All)):    at AutomationTool.Program.MainProc(Object Param)
 MainFrameActions: Packaging (Android (All)):    at AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param)
 MainFrameActions: Packaging (Android (All)):    at AutomationTool.Program.Main()
 MainFrameActions: Packaging (Android (All)): Program.Main: ERROR: ERROR: cmd.exe failed with args /c "D:/apache-ant-1.9.0/bin/ant.bat" -quiet debug
 MainFrameActions: Packaging (Android (All)): ProcessManager.KillAll: Trying to kill 0 spawned processes.
 MainFrameActions: Packaging (Android (All)): Program.Main: AutomationTool exiting with ExitCode=1
 MainFrameActions: Packaging (Android (All)): Domain_ProcessExit
 MainFrameActions: Packaging (Android (All)): ProcessManager.KillAll: Trying to kill 0 spawned processes.
 MainFrameActions: Packaging (Android (All)): copying UAT log files...
 MainFrameActions: Packaging (Android (All)): RunUAT.bat ERROR: AutomationTool was unable to run successfully.
 MainFrameActions: Packaging (Android (All)): BUILD FAILED

Product Version: Not Selected
Tags:
more ▼

asked Mar 30 '15 at 05:05 AM in Packaging & Deployment

avatar image

caseyryan
21 3 4 9

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

2 answers: sort voted first

I've solved the problem myself. What I did: ran cmd -> ant debug -f "here goes path to build.xml from log" And it said it cannot find tools.jar in C:\Program Files\Java\jdk1.8.0_40 and it confused me right away cause apparently the file was there. So the first thought that came to my mind is that the problem in a space between Program and Files, so I just copied my JDK to another location, with no spaces in name: C:\Java\jdk1.8.0_40 and also changed my JAVA_HOME environment variable to reflect the new location. Then I went to UE editor -> edit -> project settings -> android sdk and also changed the path there http://prntscr.com/6n578t Tried re-build, and BINGO! The large apk file (about ~930 Mb) was packed succesfully

more ▼

answered Mar 30 '15 at 06:04 AM

avatar image

caseyryan
21 3 4 9

avatar image dbrizov Jun 11 '16 at 08:35 PM

Had the exact same problem, thank you mate

avatar image Alihaider99 Apr 08 '19 at 10:00 PM

What do you mean by Space between program and file??? build.xml from log??

after run this Command {ant debug -f C:\NVPACK\android-sdk-windows\tools\ant\Build.xml Getting this massage:

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

-set-mode-check:

-set-debug-files:

-check-env:

BUILD FAILED C:\NVPACK\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.

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

What do you mean by Space between program and file??? build.xml from log??

after run this Command {ant debug -f C:\NVPACK\android-sdk-windows\tools\ant\Build.xml Getting this massage:

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

-set-mode-check:

-set-debug-files:

-check-env:

BUILD FAILED C:\NVPACK\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.

more ▼

answered Apr 08 '19 at 09:58 PM

avatar image

Alihaider99
1 2 3

(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