Android ndk installation and configuration on circleci



I am getting the message NDK not configured and the build is failing. I have tried setting the environment variable $ANDROID_NDK, but no luck. Here is my circle.yml file. I am a novice, please help me to figure out the issue


  • /home/ubuntu/ECGApplication/app/build/outputs/apk/

ANDROID_HOME: /usr/local/android-sdk-linux


  • ( sleep 5 && while [ 1 ]; do sleep 1; echo y; done ) | android update sdk --no-ui --all --filter “tools,platform-tools,android-23,extra-google-m2repository,extra-android-m2repository,extra-android-support”
  • echo y | android update sdk --no-ui --all --filter “build-tools-23.0.2”


  • (./gradlew assemble):
    timeout: 360

Please define ANDROID_NDK_HOME

Try adding “android.useDeprecatedNdk=true” to your file. In my case, create a file and add that value to it. My app structure is less standard than most, so I had to create the file with only that value and place it the parent directory of the project.


I have already added android.useDeprecatedNdk=true in my file


I have changed the OS to Ubuntu 12.04 (Precise) and its working now!!!
Was using Ubuntu 14.04 (Trusty)


it seems that in past docker releases circle used install_sdk function (bash) to install both ndk and sdk.
in 14.04 the scripts were split into install_sdk and install_ndk, they don’t call install ndk by default at least for now hence ndk is not installed by default on ubuntu 14.04 docker containers.

you can use in - install_ndk in your circle.yml file but i’m pretty sure the directory is not cached (it’s not part of the docer) and it will extend the build time a lot!


Please add NDK installation by default in ubuntu 14.04