# Default project android "ndk-build.cmd" build fail

**URL:** <https://forums.unrealengine.com/t/default-project-android-ndk-build-cmd-build-fail/369219>\
**Category:** Mobile\
**Tags:** ndk, unreal-engine, Android, question\
**Created:** [September 3, 2016, 11:47am UTC](https://forums.unrealengine.com/t/default-project-android-ndk-build-cmd-build-fail/369219 "2016-09-03T11:47:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_d523cdd0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d523cdd0](https://forums.unrealengine.com/u/anonymous_user_d523cdd0)\
**Post date:** [September 3, 2016, 11:47am UTC](https://forums.unrealengine.com/t/default-project-android-ndk-build-cmd-build-fail/369219/1 "2016-09-03T11:47:54Z")

</div>

UnrealBuildTool Exception: ERROR: E:/Games/Unreal Tournament//android-ndk-r12b/ndk-build.cmd failed with args APP\_ABI="armeabi-v7a " NDK\_DEBUG=1

i’ve been getting this error ever since i got the engine to properly recognize my device.

It is a default blueprint project just to test my phone, nothing else.

it’s been hours and hours reading on the internet trying all kinds of things, but it has come down to asking about it myself[link text

---

<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:** [September 7, 2016, 5:13pm UTC](https://forums.unrealengine.com/t/default-project-android-ndk-build-cmd-build-fail/369219/2 "2016-09-07T17:13:20Z")

</div>

Symbiont71,

Please make sure that you’ve installed the SDK Tools for Android and double check your Android settings. In the SDK Manager, make sure you’re on 1R4u2. Here are some visual aids for you:

 ![105874-sdkmanager.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/4/e/e4e4325cca5814278d9e35b3fae4891602073d80.png)

![98373-androidsdk.jpg|604x316](

Thanks!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8bafcfec](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8bafcfec](https://forums.unrealengine.com/u/anonymous_user_8bafcfec)\
**Post date:** [September 9, 2016, 4:03pm UTC](https://forums.unrealengine.com/t/default-project-android-ndk-build-cmd-build-fail/369219/3 "2016-09-09T16:03:34Z")

</div>

Firstly should not be living in a path with spaces move it out of the “Unreal Tournament” folder and maybe all your problems will go away.

I had something similar though so in order to really check out what the problem was I had to run ndk-build from the command line.

Go to the ndk folder. …\androind-ndk-r12b

Run ndk-build and specify a couple of things. Firstly the APP\_ABI and NDK\_DEBUG values contained in the output log. You need to set the NDK\_PROJECT\_PATH which you should find in the Intermediate folder in your project

But important here is also NDK\_LOG = 1 which will give you more info from the NDK makefiles.

```
ndk-build APP_ABI="armeabi-v7a" NDK_DEBUG=1 NDK_PROJECT_PATH="<wherever your project is>\Intermediate\Android\APK" NDK_LOG=1

```

If that doesn’t show you anything interesting you can also add -d at the end which will give you debug output from make.exe itself

In my case it was security permissions. Checking the Event Viewer \> Application and Service Logs \> Microsoft \> Windows \> AppLocker \> MSI and Script revealed that files with the name like MAKE21-028-1.BAT were being prevented from running in \AppData\Local\Temp. (our office security policies forbid executables being run in the temp folder - which is a huge pain)

Running ndk-build with the -d option confirmed that make.exe was trying to run these files.

To work around this I edited ndk-build.cmd to temporarily override an environment variable called ‘TMP’ which I guess is how make.exe finds that folder.

```
set TMP=c:\UnrealProjects\Temp

```

I can write and execute in that folder and after I did that everything was fine. No more permission errors. No need to run elevated or anything.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2013a0eb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2013a0eb](https://forums.unrealengine.com/u/anonymous_user_2013a0eb)\
**Post date:** [May 26, 2017, 4:04pm UTC](https://forums.unrealengine.com/t/default-project-android-ndk-build-cmd-build-fail/369219/4 "2017-05-26T16:04:03Z")

</div>

I got It fixed By  
“Just copying my NDK folder to **C:\android-ndk-r12b** and also run the editor as admin”.

AND also Update new path in android SDK

TY

---

<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:51am UTC](https://forums.unrealengine.com/t/default-project-android-ndk-build-cmd-build-fail/369219/5 "2017-12-26T09:51:31Z")

</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:** ![anonymous\_user\_d2c92cf6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d2c92cf6](https://forums.unrealengine.com/u/anonymous_user_d2c92cf6)\
**Post date:** [June 10, 2018, 1:05am UTC](https://forums.unrealengine.com/t/default-project-android-ndk-build-cmd-build-fail/369219/6 "2018-06-10T01:05:01Z")

</div>

None of the above solutions worked for me but this settled everything

[link text

[Android packaging error - Mobile - Epic Developer Community Forums](https://answers.unrealengine.com/questions/564580/android-packaging-error-6.html?sort=oldest)

Try it out.good luck

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6a2fb347](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6a2fb347](https://forums.unrealengine.com/u/anonymous_user_6a2fb347)\
**Post date:** [July 10, 2020, 3:52am UTC](https://forums.unrealengine.com/t/default-project-android-ndk-build-cmd-build-fail/369219/7 "2020-07-10T03:52:20Z")

</div>

download and instal sdk and ndk and jdk in this video :
