# Android packaging build fail - UE 4.18

**URL:** <https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385>\
**Category:** Mobile\
**Tags:** Android-Packaging, unreal-engine, Android, packaging-projects, build-failed, UE4, question\
**Created:** [October 31, 2017, 9:05am UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385 "2017-10-31T09:05:17Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![UGxSynteX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UGxSynteX](https://forums.unrealengine.com/u/UGxSynteX)\
**Post date:** [October 31, 2017, 9:05am UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385/1 "2017-10-31T09:05:17Z")

</div>

Hello, I get the build file error below:

> UEDeployAndroid.MakeApk:  
> ====31-10-2017 09:51:22====PERFORMING FINAL APK PACKAGE  
> OPERATION================================================ UEDeployAndroid.CreateRunGradle:  
> UEDeployAndroid.CreateRunGradle:  
> Creating rungradle.bat to work around  
> commandline length limit (using unused  
> drive letter Z:)  
> UEDeployAndroid.RunCommandLineProgramWithException:  
> Making .apk with Gradle…  
> ExceptionUtils.PrintExceptionInfo:  
> ============================================================================== ExceptionUtils.PrintExceptionInfo:  
> ERROR: cmd.exe failed with args /c  
> “D:\Stage -  
> kornelis\ARcore\HelloARSample  
> 4.18\Intermediate/Android/APK\gradle\rungradle.bat”  
> :app:assembleDebug  
> ExceptionUtils.PrintExceptionInfo:  
> (see  
> C:\Users\coolb\AppData\Roaming\Unreal  
> Engine\AutomationTool\Logs\D+Program+Files+Epic+Games+UE\_4.18\UAT\_Log.txt  
> for full exception trace)  
> ExceptionUtils.PrintExceptionInfo:  
> ExceptionUtils.PrintExceptionInfo:  
> BuildException: cmd.exe failed with  
> args /c “D:\Stage -  
> kornelis\ARcore\HelloARSample  
> 4.18\Intermediate/Android/APK\gradle\rungradle.bat”  
> :app:assembleDebug  
> ExceptionUtils.PrintExceptionInfo:  
> bij  
> UnrealBuildTool.UEDeployAndroid.RunCommandLineProgramWithException(String  
> WorkingDirectory, String Command,  
> String Params, String OverrideDesc,  
> Boolean bUseShellExecute)  
> ExceptionUtils.PrintExceptionInfo:  
> bij  
> UnrealBuildTool.UEDeployAndroid.MakeApk(AndroidToolChain  
> ToolChain, String ProjectName, String  
> ProjectDirectory, String OutputPath,  
> String EngineDirectory, Boolean  
> bForDistribution, String CookFlavor,  
> Boolean bMakeSeparateApks, Boolean  
> bIncrementalPackage, Boolean  
> bDisallowPackagingDataInApk, Boolean  
> bDisallowExternalFilesDir)  
> ExceptionUtils.PrintExceptionInfo:  
> bij  
> UnrealBuildTool.UEDeployAndroid.PrepForUATPackageOrDeploy(FileReference  
> ProjectFile, String ProjectName,  
> DirectoryReference ProjectDirectory,  
> String ExecutablePath, String  
> EngineDirectory, Boolean  
> bForDistribution, String CookFlavor,  
> Boolean bIsDataDeploy)  
> ExceptionUtils.PrintExceptionInfo:  
> bij  
> AndroidPlatform.Package(ProjectParams  
> Params, DeploymentContext SC, Int32  
> WorkingCL)  
> ExceptionUtils.PrintExceptionInfo:  
> bij Project.Package(ProjectParams  
> Params, Int32 WorkingCL)  
> ExceptionUtils.PrintExceptionInfo:  
> bij  
> BuildCookRun.DoBuildCookRun(ProjectParams  
> Params)  
> ExceptionUtils.PrintExceptionInfo:  
> bij BuildCookRun.ExecuteBuild()  
> ExceptionUtils.PrintExceptionInfo:  
> bij  
> AutomationTool.BuildCommand.Execute()  
> ExceptionUtils.PrintExceptionInfo:  
> bij  
> AutomationTool.Automation.Execute(List`1 CommandsToExecute, Dictionary`2  
> Commands)  
> ExceptionUtils.PrintExceptionInfo:  
> bij  
> AutomationTool.Automation.Process(String  
> Arguments)  
> ExceptionUtils.PrintExceptionInfo:  
> bij  
> AutomationTool.Program.MainProc(Object  
> Param)  
> ExceptionUtils.PrintExceptionInfo:  
> bij  
> AutomationTool.InternalUtils.RunSingleInstance(Func`2  
> Main, Object Param)  
> ExceptionUtils.PrintExceptionInfo:  
> bij AutomationTool.Program.Main()  
> ExceptionUtils.PrintExceptionInfo:  
> ============================================================================== Program.Main: AutomationTool exiting  
> with ExitCode=1 (Error\_Unknown)

I hope that someone can tell me what goes wrong and how to fix it?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_de0bdcd5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_de0bdcd5](https://forums.unrealengine.com/u/anonymous_user_de0bdcd5)\
**Post date:** [October 31, 2017, 11:23pm UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385/2 "2017-10-31T23:23:56Z")

</div>

try to uncheck “Enable gradle instead of ant” in project settings → android.

---

<div class="post-metadata">

**Author:** ![UGxSynteX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UGxSynteX](https://forums.unrealengine.com/u/UGxSynteX)\
**Post date:** [November 1, 2017, 11:32am UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385/3 "2017-11-01T11:32:13Z")

</div>

Yeah, I found this “fix” in different topics here on UE answers. But this won’t work! giving the same error somehow!

---

<div class="post-metadata">

**Author:** ![Dnokiseki](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dnokiseki](https://forums.unrealengine.com/u/Dnokiseki)\
**Post date:** [November 7, 2017, 4:16am UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385/4 "2017-11-07T04:16:34Z")

</div>

How to fix? Please give me a link,thx

---

<div class="post-metadata">

**Author:** ![Anonymous\_8ff45bb8792afa6ecc59ce1bcae1affe](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/anonymous_8ff45bb8792afa6ecc59ce1bcae1affe/32/755655_2.png) [@Anonymous\_8ff45bb8792afa6ecc59ce1bcae1affe](https://forums.unrealengine.com/u/Anonymous_8ff45bb8792afa6ecc59ce1bcae1affe)\
**Post date:** [November 18, 2017, 1:51am UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385/5 "2017-11-18T01:51:02Z")

</div>

I succeeded package with “Enable gradle instead of ant” enabled.

1. run NVPACK/android-sdk-windows/tools/android.bat
2. click on “Deselect All”
3. update Extras/Android Support Repository

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_7bf0f18f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_7bf0f18f](https://forums.unrealengine.com/u/anonymous_user_7bf0f18f)\
**Post date:** [November 27, 2017, 2:50pm UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385/6 "2017-11-27T14:50:58Z")

</div>

Hi. I had the same issues as mentioned above and I tried what you (okqi) are saying.

IT WORKED

thanks.

---

<div class="post-metadata">

**Author:** ![Ferox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ferox](https://forums.unrealengine.com/u/Ferox)\
**Post date:** [December 5, 2017, 2:56pm UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385/7 "2017-12-05T14:56:36Z")

</div>

Worked thank you!

---

<div class="post-metadata">

**Author:** ![jackey7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jackey7](https://forums.unrealengine.com/u/jackey7)\
**Post date:** [December 18, 2017, 7:05am UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385/8 "2017-12-18T07:05:42Z")

</div>

I am using UE 4.18.2 and also update the lastest Android Support Repository (Rev47).  
But I still get this error somehow.  
Anyone know why?thanks

---

<div class="post-metadata">

**Author:** ![UGxSynteX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UGxSynteX](https://forums.unrealengine.com/u/UGxSynteX)\
**Post date:** [December 18, 2017, 7:56am UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385/9 "2017-12-18T07:56:45Z")

</div>

This is the perfect answer! it worked on 4.18.2

---

<div class="post-metadata">

**Author:** ![MRVRMAN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MRVRMAN](https://forums.unrealengine.com/u/MRVRMAN)\
**Post date:** [December 28, 2017, 11:55am UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385/10 "2017-12-28T11:55:13Z")

</div>

This fix did the job Thank you 🙂

---

<div class="post-metadata">

**Author:** ![newtori](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@newtori](https://forums.unrealengine.com/u/newtori)\
**Post date:** [January 10, 2018, 5:11pm UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385/11 "2018-01-10T17:11:45Z")

</div>

Thank you very much!!

---

<div class="post-metadata">

**Author:** ![Gelker\_Ribeiro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gelker\_Ribeiro](https://forums.unrealengine.com/u/Gelker_Ribeiro)\
**Post date:** [January 28, 2018, 2:21am UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385/12 "2018-01-28T02:21:38Z")

</div>

I was facing the same promises,  
I’ll tie the:  
Enable Gradle instead of Ant  
And the NDK API Lelel (spcific version or lastest) for: "lastest

and finally I was able to compile the app.  
good luck

---

<div class="post-metadata">

**Author:** ![philolo65](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@philolo65](https://forums.unrealengine.com/u/philolo65)\
**Post date:** [March 3, 2018, 8:41pm UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385/13 "2018-03-03T20:41:56Z")

</div>

Thank you so much, this is very helpful!

---

<div class="post-metadata">

**Author:** ![Widzo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Widzo](https://forums.unrealengine.com/u/Widzo)\
**Post date:** [March 7, 2018, 4:48am UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385/14 "2018-03-07T04:48:49Z")

</div>

Thanks, it worked for me =)

---

<div class="post-metadata">

**Author:** ![CD\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CD\_1](https://forums.unrealengine.com/u/CD_1)\
**Post date:** [April 17, 2018, 9:05am UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385/15 "2018-04-17T09:05:35Z")

</div>

It Work for me, thank you.

---

<div class="post-metadata">

**Author:** ![Raptagon\_Studios](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Raptagon\_Studios](https://forums.unrealengine.com/u/Raptagon_Studios)\
**Post date:** [April 26, 2018, 12:43am UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385/16 "2018-04-26T00:43:50Z")

</div>

Yeah, same here. I already have Gradle enabled instead of Ant and I have the latest version of Android Support Repository. If someone could assist us, that would be grand.

---

<div class="post-metadata">

**Author:** ![maxgtp](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@maxgtp](https://forums.unrealengine.com/u/maxgtp)\
**Post date:** [May 11, 2018, 5:34pm UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385/17 "2018-05-11T17:34:21Z")

</div>

Hi I’m goku ;).

For those who have errors in GRADLE.

1 ° Deactivate in unreal in the configurations of your project.

2 Delete the INTERMEDIATE folder in the folder where your project is located. It is not necessary to be afraid to delete the project from the pre-saved packaging (FOLDER INTERMEDIATE). This will not delete the base (master) project.

3 Open your project on unreal and see if GRADLE is disabled again. It’s ok

4 ° All ready to pack, without errors GRADLES.

5 ° Pay a beer for me, and I will always help 🙂  
Welcome to the unreal world, where everything is paid, even the air that your character will virtually breathe on the platform.

---

<div class="post-metadata">

**Author:** ![Rubio323](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rubio323](https://forums.unrealengine.com/u/Rubio323)\
**Post date:** [May 27, 2018, 9:22pm UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385/18 "2018-05-27T21:22:09Z")

</div>

Within unreal in project settings / platforms / android … search android package Name must be composed of two names separated by a period (example: com.mygame)

---

<div class="post-metadata">

**Author:** ![jakwarne](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jakwarne](https://forums.unrealengine.com/u/jakwarne)\
**Post date:** [October 16, 2018, 10:29am UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385/19 "2018-10-16T10:29:45Z")

</div>

To anybody else experiencing this problem that couldn’t find a fix, I had the same error and it turned out to be my firewall blocking it from running.

---

<div class="post-metadata">

**Author:** ![VenomStyx](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/venomstyx/32/490334_2.png) [@VenomStyx](https://forums.unrealengine.com/u/VenomStyx)\
**Post date:** [November 8, 2018, 5:32am UTC](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385/20 "2018-11-08T05:32:55Z")

</div>

Me as well

[Next page](https://forums.unrealengine.com/t/android-packaging-build-fail-ue-4-18/408385.md?page=2)
