Android NDK build for Pipelines

Hi,

I tried to use Pipelines for my project. The problem is that I use ndk in my project. I found pipelines configuration file for Android which looks like this:

image: uber/android-build-environment:latest

pipelines:
  default:
    - step:
        script:
          - ./build.sh

where build.sh looks like:

mkdir "${ANDROID_HOME}/licenses" || true
echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > "${ANDROID_HOME}/licenses/android-sdk-license"

./gradlew assembleDebug

But I've got following error:

<filename>.cpp:1:17: fatal error: jni.h: No such file or directory
compilation terminated.
make: *** [/opt/atlassian/pipelines/agent/build/app/build/intermediates/ndk/dev/debug/obj/local/armeabi-v7a/objs/<project name>//opt/atlassian/pipelines/agent/build/app/src/main/jni/<filename>.o] Error 1
:app:compileDevDebugNdk FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDevDebugNdk'.
> com.android.ide.common.process.ProcessException: Error while executing '/usr/local/android-ndk/ndk-build' with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/opt/atlassian/pipelines/agent/build/app/build/intermediates/ndk/dev/debug/Android.mk APP_PLATFORM=android-25 NDK_OUT=/opt/atlassian/pipelines/agent/build/app/build/intermediates/ndk/dev/debug/obj NDK_LIBS_OUT=/opt/atlassian/pipelines/agent/build/app/build/intermediates/ndk/dev/debug/lib APP_ABI=armeabi-v7a,armeabi,mips,x86}
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED

What should I change in my configuration to make it work.

 

Thanks

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

194 views 3 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you