# Android

**URL:** https://discuss.bitrise.io/c/how-to/android/53.md

[Latest](https://discuss.bitrise.io/latest.md) · [Categories](https://discuss.bitrise.io/categories.md) · [Tags](https://discuss.bitrise.io/tags.md)

---

## [About the Android category](https://discuss.bitrise.io/t/about-the-android-category/20793)

<div class="topic-metadata">

**Author:** [@damien.murphy](https://discuss.bitrise.io/u/damien.murphy)\
**Replies:** 0

</div>

How to do all things Android

---

## [Make repo that was cloned available to subsequent stages in a pipeline](https://discuss.bitrise.io/t/make-repo-that-was-cloned-available-to-subsequent-stages-in-a-pipeline/22958)

<div class="topic-metadata">

**Author:** [@jswigut](https://discuss.bitrise.io/u/jswigut)\
**Replies:** 1\
**Last updated:** [June 28, 2023, 10:48am UTC](https://discuss.bitrise.io/t/make-repo-that-was-cloned-available-to-subsequent-stages-in-a-pipeline/22958 "2023-06-28T10:48:26Z")

</div>

pipelines: pipeline-release-all: stages: - stage-setup: {} - stage-test: {} - stage-version-all: {} - stage-publish-all: {} - stage-finish: {} I have this pipeline which calls the git-clone ste…

---

## [How to install cmake using Android sdkmanager?](https://discuss.bitrise.io/t/how-to-install-cmake-using-android-sdkmanager/876)

<div class="topic-metadata">

**Author:** [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Replies:** 3\
**Last updated:** [April 5, 2023, 1:04pm UTC](https://discuss.bitrise.io/t/how-to-install-cmake-using-android-sdkmanager/876 "2023-04-05T13:04:03Z")

</div>

You can do this with a simple Script step: (source: Remove pre-installed CMake by viktorbenei · Pull Request #38 · bitrise-io/android-ndk · GitHub ) #!/bin/bash set -ex mkdir -p "${ANDROID\_HOME}/licenses" echo "8933bad…

---

## [Script mkdir cmd permission denied](https://discuss.bitrise.io/t/script-mkdir-cmd-permission-denied/22210)

<div class="topic-metadata">

**Author:** [@abdo400](https://discuss.bitrise.io/u/abdo400)\
**Replies:** 9\
**Last updated:** [February 14, 2023, 8:10pm UTC](https://discuss.bitrise.io/t/script-mkdir-cmd-permission-denied/22210 "2023-02-14T20:10:39Z")

</div>

I am trying to install a custom NDK version. I followed the steps from this post but I got a permission error: + mkdir /opt/android-ndk-tmp mkdir: /opt/android-ndk-tmp: Permission denied exit status 1 For context, I…

---

## [How to build different flavors of an Android project](https://discuss.bitrise.io/t/how-to-build-different-flavors-of-an-android-project/4223)

<div class="topic-metadata">

**Author:** [@tamaspapik](https://discuss.bitrise.io/u/tamaspapik)\
**Replies:** 7\
**Last updated:** [October 25, 2022, 1:13pm UTC](https://discuss.bitrise.io/t/how-to-build-different-flavors-of-an-android-project/4223 "2022-10-25T13:13:03Z")

</div>

It might happen that you will have multiple flavors of APKs. Usually gradle makes it very easy to select the flavor of the project by putting the flavor name to the specified place in the gradle task’s name. Here is a s…

---

## [How-to run Android tests on Firebase TestLab](https://discuss.bitrise.io/t/how-to-run-android-tests-on-firebase-testlab/2192)

<div class="topic-metadata">

**Author:** [@tamaspapik](https://discuss.bitrise.io/u/tamaspapik)\
**Replies:** 16\
**Last updated:** [September 15, 2021, 7:47am UTC](https://discuss.bitrise.io/t/how-to-run-android-tests-on-firebase-testlab/2192 "2021-09-15T07:47:30Z")

</div>

On Android stacks we have the gcloud and gsutil tools pre-installed, this guide is based on these tools. If you want to use it on other stacks, you will need to install these first. ###What you’ll need a Google Cloud…

---

## [How to run Android UI tests on virtual devices](https://discuss.bitrise.io/t/how-to-run-android-ui-tests-on-virtual-devices/2496)

<div class="topic-metadata">

**Author:** [@tamaspapik](https://discuss.bitrise.io/u/tamaspapik)\
**Replies:** 52\
**Last updated:** [May 12, 2020, 11:30am UTC](https://discuss.bitrise.io/t/how-to-run-android-ui-tests-on-virtual-devices/2496 "2020-05-12T11:30:28Z")

</div>

The new feature, Virtual Device Testing for Android is here! It is currently in private-beta test phase, please ping us if you want to join! One test can be ran in one build at the moment, and robo test type has some li…

---

## [Android Emulator in 90 seconds](https://discuss.bitrise.io/t/android-emulator-in-90-seconds/1181)

<div class="topic-metadata">

**Author:** [@tamaspapik](https://discuss.bitrise.io/u/tamaspapik)\
**Replies:** 18\
**Last updated:** [June 24, 2019, 1:06pm UTC](https://discuss.bitrise.io/t/android-emulator-in-90-seconds/1181 "2019-06-24T13:06:10Z")

</div>

\#Edit For now it seems like, the new avdmanager breaks this how-to. Please follow the written below if you are still using emulator as executable to create and use your emulator. #Summary The two steps Bitrise.io Cach…

---

## [Bitrise How To Build Android Apps With Flutter Modules](https://discuss.bitrise.io/t/bitrise-how-to-build-android-apps-with-flutter-modules/8930)

<div class="topic-metadata">

**Author:** [@rayliverified](https://discuss.bitrise.io/u/rayliverified)\
**Replies:** 15\
**Last updated:** [May 14, 2019, 12:09pm UTC](https://discuss.bitrise.io/t/bitrise-how-to-build-android-apps-with-flutter-modules/8930 "2019-05-14T12:09:23Z")

</div>

I’m trying to build an Android app with a Flutter module. Unfortunately, Bitrise is unable to find the Flutter SDK and throws the following error: Ensure required Android SDK components Retrying... Failed to ensure andr…

---

## [How to install a specific Android NDK version on the Android/Linux stack](https://discuss.bitrise.io/t/how-to-install-a-specific-android-ndk-version-on-the-android-linux-stack/4400)

<div class="topic-metadata">

**Author:** [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Replies:** 8\
**Last updated:** [March 11, 2019, 8:29am UTC](https://discuss.bitrise.io/t/how-to-install-a-specific-android-ndk-version-on-the-android-linux-stack/4400 "2019-03-11T08:29:23Z")

</div>

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 foll…

---

## [How to add Swap on Linux/Android/Docker stack](https://discuss.bitrise.io/t/how-to-add-swap-on-linux-android-docker-stack/3557)

<div class="topic-metadata">

**Author:** [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Replies:** 7\
**Last updated:** [March 3, 2018, 10:17am UTC](https://discuss.bitrise.io/t/how-to-add-swap-on-linux-android-docker-stack/3557 "2018-03-03T10:17:42Z")

</div>

UPDATE: swap is now pre-configured on all stacks since: Weekly Virtual Machine / Stack updates - 2018.02.24 (added swap to Linux/Android stacks, the Mac ones already had swap configured). You can of course still reconfi…

---

## [How to generate or set version number for Android apps](https://discuss.bitrise.io/t/how-to-generate-or-set-version-number-for-android-apps/3837)

<div class="topic-metadata">

**Author:** [@koral](https://discuss.bitrise.io/u/koral)\
**Replies:** 2\
**Last updated:** [February 8, 2018, 3:53pm UTC](https://discuss.bitrise.io/t/how-to-generate-or-set-version-number-for-android-apps/3837 "2018-02-08T15:53:47Z")

</div>

Here are two sources of version number (code and/or name) generation for Android projects. Commit timestamp Buildscript (build.gradle snippet): buildscript { repositories { jcenter() } dependencies { classpath …

---

## [How to connect physical devices to bitrise.io](https://discuss.bitrise.io/t/how-to-connect-physical-devices-to-bitrise-io/2337)

<div class="topic-metadata">

**Author:** [@koral](https://discuss.bitrise.io/u/koral)\
**Replies:** 1\
**Last updated:** [July 24, 2017, 9:23am UTC](https://discuss.bitrise.io/t/how-to-connect-physical-devices-to-bitrise-io/2337 "2017-07-24T09:23:38Z")

</div>

If Android emulator performance and reliability is insufficient for you but you have physical devices which can be used for testing, you can use them on bitrise.io. All you need is Open STF and a public IP. Steps for Op…

---

## [How to deploy only a specific Android APK?](https://discuss.bitrise.io/t/how-to-deploy-only-a-specific-android-apk/1125)

<div class="topic-metadata">

**Author:** [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Replies:** 0\
**Last updated:** [March 14, 2017, 2:11pm UTC](https://discuss.bitrise.io/t/how-to-deploy-only-a-specific-android-apk/1125 "2017-03-14T14:11:12Z")

</div>

Here’s how you can configure your project to only deploy specific APK(s), and not all of the APKs generated during the Android/Gradle build: Note: of course to actually deploy an APK you’ll need a deploy step to be incl…

---

## [How to speed up Android emulator heavy workflows](https://discuss.bitrise.io/t/how-to-speed-up-android-emulator-heavy-workflows/801)

<div class="topic-metadata">

**Author:** [@tamaspapik](https://discuss.bitrise.io/u/tamaspapik)\
**Replies:** 0\
**Last updated:** [February 15, 2017, 2:15pm UTC](https://discuss.bitrise.io/t/how-to-speed-up-android-emulator-heavy-workflows/801 "2017-02-15T14:15:45Z")

</div>

Intro The well-known Start Android emulator step just got updated (1.1.1), and this version now supports waiting for the emulator to boot asynchronously by turning wait\_for\_boot to false. Beside of updating this step, we…

---

## [How to set/update the Build Tools version in your Android gradle project](https://discuss.bitrise.io/t/how-to-set-update-the-build-tools-version-in-your-android-gradle-project/305)

<div class="topic-metadata">

**Author:** [@godreikrisztian](https://discuss.bitrise.io/u/godreikrisztian)\
**Replies:** 0\
**Last updated:** [January 16, 2017, 3:33pm UTC](https://discuss.bitrise.io/t/how-to-set-update-the-build-tools-version-in-your-android-gradle-project/305 "2017-01-16T15:33:32Z")

</div>

The Build Tools version of your project is (by default) specified in a build.gradle file, most likely in the app sub directory. Open the file and change/specify the Build Tools version you want to use by adding/changing…
