# Build fails in android-build@1.0

**URL:** <https://discuss.bitrise.io/t/build-fails-in-android-build-1-0/20651>\
**Category:** Builds\
**Tags:** android\
**Created:** [July 29, 2022, 3:12pm UTC](https://discuss.bitrise.io/t/build-fails-in-android-build-1-0/20651 "2022-07-29T15:12:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sufyan](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@sufyan](https://discuss.bitrise.io/u/sufyan)\
**Post date:** [July 29, 2022, 3:12pm UTC](https://discuss.bitrise.io/t/build-fails-in-android-build-1-0/20651/1 "2022-07-29T15:12:25Z")

</div>

> Task :app:stripReleaseDebugSymbols FAILED  
> Support for ANDROID\_NDK\_HOME is deprecated and will be removed in the future. Use android.ndkVersion in build.gradle instead.  
> Task :app:mergeDexRelease  
> w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions  
> FAILURE: Build failed with an exception.

- What went wrong:  
Execution failed for task ‘:app:stripReleaseDebugSymbols’.

> No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi

- Try:  
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
- Get more help at [https://help.gradle.org](https://help.gradle.org)  
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.  
Use ‘–warning-mode all’ to show the individual deprecation warnings.  
See [Command-Line Interface](https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings)  
BUILD FAILED in 2m 15s  
358 actionable tasks: 358 executed  
Run: build task failed: exit status 1  
| |  
±–±--------------------------------------------------------------±---------+  
| x | android-build@1.0 (exit code: 1) | 2.3 min |  
±–±--------------------------------------------------------------±---------+  
| Issue tracker: …thub.com/bitrise-steplib/bitrise-step-android-build/issues |  
| Source: [GitHub - bitrise-steplib/bitrise-step-android-build](https://github.com/bitrise-steplib/bitrise-step-android-build) |  
±–±--------------------------------------------------------------±---------+

---

<div class="post-metadata">

**Author:** ![TzuHan\_Hsu](https://avatars.discourse-cdn.com/v4/letter/t/51bf81/32.png) [@TzuHan\_Hsu](https://discuss.bitrise.io/u/TzuHan_Hsu)\
**Post date:** [August 25, 2022, 8:15am UTC](https://discuss.bitrise.io/t/build-fails-in-android-build-1-0/20651/2 "2022-08-25T08:15:25Z")

</div>

> [@sufyan](#):
>
> No toolchains found in the NDK toolchains

Hi,  
Thank you for contacting Bitrise.

This root cause is that the ndk version in your project’s setting is different from the ndk version pre-installed on Bitrise stacks.

Currently, the pre-installed ndk version is `24.0.8215888` and you can check the [system report](https://github.com/bitrise-io/bitrise.io/tree/master/system_reports/MACOS/INTEL) for further details.

Here’re two ways to solve this issue:

1. Update the ndk version to `24.0.8215888` in your project setting, or
2. Install the ndk version you’re using locally with the `Install missing Android SDK components` step at the beginning of the workflow.

Besides that, you will also need to specify the ndk path for Gradle.

### Using Android Gradle plugin before v3.5.0

You’d need a **local.properties** file and define the ndk.dir variable.  
Since local.properties is not recommended to be stored in git, please add a **script step** after git clone step and use the following script to create a **local.properties** file.

```auto
#!/usr/bin/env bash
echo ‘Generating local.properties ...’
echo $ANDROID_HOME
cat > “./local.properties” <<- FILE_CONTENT
sdk.dir=$ANDROID_HOME
ndk.dir=$ANDROID_HOME/ndk/21.4.7075529
FILE_CONTENT

```

### Using Android Gradle plugin v3.5.0 or higher

You’d need to define the ndkVersion in your **build.gradle** file.

```auto
android { ndkVersion "xx.x.xxxxx" // e.g., ndkVersion "24.0.8215888"}

```

You can check [https://developer.android.com/studio/projects/install-ndk#apply-specific-version](https://developer.android.com/studio/projects/install-ndk#apply-specific-version) for further information.

Hope this helps!

Thanks,  
Han

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/d/d901cf2aad020f2dd11918afc89ec2089bb87b35.png) [@system](https://discuss.bitrise.io/u/system)\
**Post date:** [September 24, 2022, 8:15am UTC](https://discuss.bitrise.io/t/build-fails-in-android-build-1-0/20651/3 "2022-09-24T08:15:39Z")

</div>

Closed on September 24, 2022, 8:15am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
