Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Android NDK build for Pipelines

MistaGreen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 27, 2017

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
TAGS
AUG Leaders

Atlassian Community Events