# \[Android\] Build failed in GradleRunner step with NDK error (not used)

**URL:** https://discuss.bitrise.io/t/android-build-failed-in-gradlerunner-step-with-ndk-error-not-used/5075
**Category:** Builds
**Tags:** step, android
**Created:** [May 14, 2018, 9:25am UTC](https://discuss.bitrise.io/t/android-build-failed-in-gradlerunner-step-with-ndk-error-not-used/5075 "2018-05-14T09:25:30Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)
#### Post date: [May 14, 2018, 3:08pm UTC](https://discuss.bitrise.io/t/android-build-failed-in-gradlerunner-step-with-ndk-error-not-used/5075/9 "2018-05-14T15:08:45Z")

</div>

Issue seems to be related to the Android NDK version upgrade which we rolled out this weekend (from r16b to r17):

> [@Weekly Virtual Machine / Stack updates - 2018.05.12](http://discuss.bitrise.io/t/weekly-virtual-machine-stack-updates-2018-05-12/5054):
>
> Highlights Android/Linux stacks Latest: NDK updated to r17 (thanks @koral rocket) Official Android NDK changelog: [Changelog r17 · android/ndk Wiki · GitHub](https://github.com/android-ndk/ndk/wiki/Changelog-r17)Xcode stacks No significant change Visual Studio for Mac stacks Stable channel: [https://releases.xamarin.com/release-15-7/](https://releases.xamarin.com/release-15-7/) Beta channel: [https://releases.xamarin.com/15-8-preview-1/](https://releases.xamarin.com/15-8-preview-1/)Hybrid stacks No significant change This week’s changes (diffs) Stack System Reports You can find the full system report of all of the available …

Related system report changelog : [Weekly VM updates by ghaabor · Pull Request #212 · bitrise-io/bitrise.io · GitHub](https://github.com/bitrise-io/bitrise.io/pull/212/commits/4331f07ccf77d7e57bfce67c269687100a7458a3)

Quick question @itelios.team-mobile - did you upgrade the Android NDK on your own Mac/PC to `r17`?  
If you’re not using r17 yet or if you want to use a specific NDK version the best is to just install it via a Script step:

> [@How to install a specific Android NDK version on the Android/Linux stack](http://discuss.bitrise.io/t/how-to-install-a-specific-android-ndk-version-on-the-android-ndk-stack/4400):
>
> If the NDK version which is preinstalled on the Android stack is not the one you want to use, you can install any version via a Script step. Simply add a Script step as the very first step in the workflow, with the following content: #!/usr/bin/env bash set -ex # set env vars export ANDROID\_NDK\_VERSION='r15b' export ANDROID\_NDK\_HOME='/opt/android-ndk' # expose for subsequent steps envman add --key ANDROID\_NDK\_HOME --value "$ANDROID\_NDK\_HOME" # -----------------------------------------------…

---

_[View the full topic](https://discuss.bitrise.io/t/android-build-failed-in-gradlerunner-step-with-ndk-error-not-used/5075)._
