# Android Build Failed

**URL:** <https://forums.unrealengine.com/t/android-build-failed/315678>\
**Category:** Mobile\
**Tags:** automationtool, Android-Packaging, build-error, unreal-engine, Android, question\
**Created:** [April 20, 2015, 7:10am UTC](https://forums.unrealengine.com/t/android-build-failed/315678 "2015-04-20T07:10:04Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitishmisra](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nitishmisra](https://forums.unrealengine.com/u/nitishmisra)\
**Post date:** [April 20, 2015, 7:10am UTC](https://forums.unrealengine.com/t/android-build-failed/315678/1 "2015-04-20T07:10:04Z")

</div>

I had posted a similar question a few weeks back, but got no reply, so I’ll try posting again. I’ve been trying to package my game for Android, but no matter what I do, I keep getting the build failed error. I’ve tried looking it up online, but I still cannot build my game. I’ve attached the log file this time.

[Log][1]

[39388-uat\_log.txt](https://forums.unrealengine.com/uploads/short-url/3kxkJNGfTbi8LuVtzhe06yvnSHH.txt) (355 KB)

---

<div class="post-metadata">

**Author:** ![joshbadams](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@joshbadams](https://forums.unrealengine.com/u/joshbadams)\
**Post date:** [April 20, 2015, 4:04pm UTC](https://forums.unrealengine.com/t/android-build-failed/315678/2 "2015-04-20T16:04:55Z")

</div>

Sadly, the actual error isn’t printing:

```
UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Preparing native code for debugging...
UEDeployAndroid.RunCommandLineProgramAndThrowOnError: 
Running: F://android-ndk-r9c/ndk-build.cmd APP_ABI="armeabi-v7a " NDK_DEBUG=1
BuildCommand.Execute: BUILD FAILED
Program.Main: AutomationTool terminated with exception:
Program.Main: Exception in UnrealBuildTool: ERROR: F://android-ndk-r9c/ndk-build.cmd failed with args APP_ABI="armeabi-v7a " NDK_DEBUG=1

```

You should go into the /Intermediate/Android/APK directory and run that command (F://android-ndk-r9c/ndk-build.cmd APP\_ABI="armeabi-v7a " NDK\_DEBUG=1) and see if you see any more output.

Josh

---

<div class="post-metadata">

**Author:** ![nitishmisra](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nitishmisra](https://forums.unrealengine.com/u/nitishmisra)\
**Post date:** [April 21, 2015, 5:13am UTC](https://forums.unrealengine.com/t/android-build-failed/315678/3 "2015-04-21T05:13:19Z")

</div>

Hi, thanks for replying. I did that, and here’s what I’m getting

```
C:\WINDOWS\system32>F://android-ndk-r9c/ndk-build.cmd APP_ABI="armeabi-v7a
 " NDK_DEBUG=1
Android NDK: Could not find application project directory !
Android NDK: Please define the NDK_PROJECT_PATH variable to point to it.
F:\\android-ndk-r9c\build/core/build-local.mk:148: *** Android NDK: Aborti
ng . Stop.

```

Press any key to continue . . .

---

<div class="post-metadata">

**Author:** ![joshbadams](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@joshbadams](https://forums.unrealengine.com/u/joshbadams)\
**Post date:** [April 21, 2015, 7:54pm UTC](https://forums.unrealengine.com/t/android-build-failed/315678/4 "2015-04-21T19:54:50Z")

</div>

You are not running from the proper directory. You need to do this first:

```
pushd <PathToProject>\Intermediate\Android\APK

```

something like:

```
pushd "D:\Unreal Engine\My Projects\AwesomeProject\Intermediate\Android\APK"
```

---

<div class="post-metadata">

**Author:** ![nitishmisra](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nitishmisra](https://forums.unrealengine.com/u/nitishmisra)\
**Post date:** [April 22, 2015, 4:51am UTC](https://forums.unrealengine.com/t/android-build-failed/315678/5 "2015-04-22T04:51:22Z")

</div>

Oh ok! I did what you said, and this is the output I got.

```
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Users\Nitish>pusd C:\Users\Nitish\Documents\Unreal Projects\Blockmania 4.7\In
termediate\Android\APK
'pusd' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Nitish>pushd C:\Users\Nitish\Documents\Unreal Projects\Blockmania 4.7\I
ntermediate\Android\APK

C:\Users\Nitish\Documents\Unreal Projects\Blockmania 4.7\Intermediate\Android\AP
K>F://android-ndk-r9c/ndk-build.cmd APP_ABI="armeabi-v7a " NDK_DEBUG=1
[armeabi-v7a] Gdbserver : [arm-linux-androideabi-4.6] libs/armeabi-v7a/gdbs
erver
[armeabi-v7a] Gdbsetup : libs/armeabi-v7a/gdb.setup
[armeabi-v7a] Prebuilt : libUE4.so <= jni/armeabi-v7a/
[armeabi-v7a] Install : libUE4.so => libs/armeabi-v7a/libUE4.so
Press any key to continue . . .

```

---

<div class="post-metadata">

**Author:** ![joshbadams](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@joshbadams](https://forums.unrealengine.com/u/joshbadams)\
**Post date:** [April 22, 2015, 3:20pm UTC](https://forums.unrealengine.com/t/android-build-failed/315678/6 "2015-04-22T15:20:55Z")

</div>

Well frustratingly that looks all good (except for the Press any key to continue at the end - when I run ndk-build, I don’t get that happening). Maybe that is actually not coming from ndk-build?

Basically, I can’t tell what is happening, because command that your log shows is failing is working correctly when you run it…

---

<div class="post-metadata">

**Author:** ![nitishmisra](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nitishmisra](https://forums.unrealengine.com/u/nitishmisra)\
**Post date:** [April 23, 2015, 12:16pm UTC](https://forums.unrealengine.com/t/android-build-failed/315678/7 "2015-04-23T12:16:33Z")

</div>

Oh! Is there anything else I could show you that could give you an idea as to what’s wrong? For starters, I didn’t install UE4 in the default location, neither the android SDK files (The default location is C, but I installed it in F, since I didn’t have space in my C ), but I set it in the project settings. Could that be on any use?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2c8f6965](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2c8f6965](https://forums.unrealengine.com/u/anonymous_user_2c8f6965)\
**Post date:** [July 14, 2016, 4:25pm UTC](https://forums.unrealengine.com/t/android-build-failed/315678/8 "2016-07-14T16:25:57Z")

</div>

Hello ! I am experiencing the same error while compiling Unreal Engine on Android.

Doing the same command you recommended, I have this error. Could you please help me resolve it ?

D:\UnrealEngine\unrealengine-custom\Engine\Intermediate\Android\>C://android-ndk-r11c/ndk-build.cmd failed with args APP\_ABI="armeabi-v7a " NDK\_DEBUG=1  
Android NDK: Could not find application project directory !  
Android NDK: Please define the NDK\_PROJECT\_PATH variable to point to it.  
C:\android-ndk-r11c\build\…\build\core\build-local.mk:151: \*\*\* Android NDK: Aborting . Stop.

Thanks !

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [July 15, 2016, 1:37pm UTC](https://forums.unrealengine.com/t/android-build-failed/315678/9 "2016-07-15T13:37:43Z")

</div>

Please submit your own AnswerHub thread for additional assistance. This is an older thread and likely the issue is not the same.

Thanks!

---

<div class="post-metadata">

**Author:** ![The\_Dark\_Light](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@The\_Dark\_Light](https://forums.unrealengine.com/u/The_Dark_Light)\
**Post date:** [December 26, 2017, 9:52am UTC](https://forums.unrealengine.com/t/android-build-failed/315678/10 "2017-12-26T09:52:20Z")

</div>

hey guys, I had the same problem when I 'am trying to deploy my game on my tablet android 5.1 (API 22) so this is what I did :

- Project Settings \> Android \>
- check Support arm64 [aka arm64-v8a]

 ![225097-ue4-fix.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/6/8/168ed39cb13c33e740201782672c8f586c731f29.png)

just that and then I had the Gradle problem I just unchecked the “Enable Gradle Instead of Ant”

 ![225098-ue4-fix-gradle.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/9/8/09886100bff8fcb9ff86cc26ef643009073377a0.png)

Hope this helps 🙂

---

<div class="post-metadata">

**Author:** ![Kuszauke321](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kuszauke321](https://forums.unrealengine.com/u/Kuszauke321)\
**Post date:** [February 8, 2021, 5:39pm UTC](https://forums.unrealengine.com/t/android-build-failed/315678/11 "2021-02-08T17:39:41Z")

</div>

Sorry for imposing You . I have landed in this threat because i looking for answers on my problem… every think here : [Can't package project on Android AutomationTool exiting with ExitCode=25 (Error\_UnknownCookFailure) - Platform & Builds - Epic Developer Community Forums](https://answers.unrealengine.com/questions/1010624/cant-package-project-on-android-automationtool-exi.html)

This is 2nd time i posted this threat. PLS help me
