I'm trying to set up my CI for a Android project that uses some C++ code. As such I need the NDK that doesn't come pre-installed on Travis Android images. I'm currently achieving this by pulling the NDK myself, however my CI box is complaining about the CMake license not being accepted. The weird thing is that I thought this was included in the android-sdk-license which I am already including in my build. My travis YAML looks like this:
language: android
jdk:
- oraclejdk8
- oraclejdk9
android:
components:
- tools
- platform-tools
- tools
- build-tools-26.0.2
- android-26
- extra-android-m2repository
- extra-google-m2repository
- extra-android-support
- extra-google-google_play_services
- add-on
- extra
licenses:
- 'android-sdk-preview-license-.+'
- 'android-sdk-license-.+'
before_script:
- wget https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip
- unzip -qq android-ndk-r16b-linux-x86_64.zip
- export ANDROID_NDK_HOME=`pwd`/android-ndk-r16b
- export LOCAL_ANDROID_NDK_HOME="$ANDROID_NDK_HOME"
- export LOCAL_ANDROID_NDK_HOST_PLATFORM="linux-x86_64"
- export PATH=$PATH:${ANDROID_NDK_HOME}
- env
script: ./gradlew build jacocoTestReport
matrix:
fast_finish: true
allow_failures:
- jdk: oraclejdk9
notifications:
email: false
after_success:
— bash <(curl -s https://codecov.io/bash)
The license error can be seen at the bottom of the build here
This is currently working for me:
install:
- echo y | sdkmanager 'ndk-bundle'
- echo y | sdkmanager 'cmake;3.6.4111459'
- echo y | sdkmanager 'lldb;3.0'
My .travis.yml is available here.
Looks like the NDK samples use travis, maybe look there to see what's missing from your build: https://github.com/googlesamples/android-ndk/blob/master/.travis.yml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With