2

Hi I have an android app I build on Travis CI. Unfortunately the build fails, because lint says that the platform sdk tools are too old:

The SDK platform-tools version (23.0.1) is too old to check APIs compiled with API 25; please update

The build tools I use (in build.gradle file) is 25.0.1 and I compile with API 25. On my local machine my app compiles fine from command line without any lint errors.

My .travis.yml file looks like this:

language: android
android:
  components:
  - tools
  - build-tools-25.0.1
  - extra-android-m2repository
  - android-25
jdk:
- oraclejdk8
licenses:
- android-sdk-license-.+
- android-sdk-license-c81a61d9

Any idea what could be wrong with my travis settings?

sockeqwe
  • 15,574
  • 24
  • 88
  • 144

2 Answers2

2

You should add platform-tools to your components: block. I have it listed first in my .travis.yml:

android:
    components:
        - platform-tools
        - tools
        - build-tools-25.0.1
        - android-25
        - extra-android-m2repository
        - extra-android-support
        - extra-google-m2repository
        - extra-google-google_play_services
Code-Apprentice
  • 81,660
  • 23
  • 145
  • 268
0

At the moment Travis has such issue that's not yet resolved: https://github.com/travis-ci/travis-ci/issues/6699

Going from there I found a workaround that worked for me - you need to duplicate android and build-tools sections as below, with the version you need. It's said this way Travis gets the right versions: https://github.com/syncthing/syncthing-android/pull/789

...
android:
  components:
    - tools
    - android-24
    - build-tools-24.0.2
    - platform-tools
    - build-tools-24.0.2
    - android-24
...
Artem Novikov
  • 4,087
  • 1
  • 27
  • 33