florent champigny
florent champigny

Reputation: 979

How to run Travis-Ci with android 22

With some open-source projects, I use travis-ci to perform my continuous integration, and I really like this website.

There's my problem, when I set my android sdk to 'android-22', the build fail

Build tools 22.0.0 missing. Downloading...
Compilation API android-22 missing. Downloading...
Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes precedence.
java.lang.IllegalStateException: failed to find target android-22 : /usr/local/android-sdk

Travis works fine with android-19, following the official documentation

How can I make it works ?

https://github.com/florent37/MaterialViewPager

My travis file is

    language: android

    jdk:
      - openjdk7

    android:
      components:

        - build-tools-21.1.1
        - android-21
        - extra-android-support
        - extra-google-google_play_services
        - extra-google-m2repository
        - extra-android-m2repository

    notifications:
      email: true

    # Turn off caching to avoid any caching problems
    cache: false
    # Use the Travis Container-Based Infrastructure (see #203)
    sudo: false

    install:
      # Ensure Gradle wrapper is executable, download wrapper and show version
      - chmod +x ./gradlew; ls -l gradlew; ./gradlew wrapper -v
      # Download and show android dependencies
      # - ./gradlew androidDependencies

    script:
      - ./gradlew clean assembleDebug

Upvotes: 1

Views: 363

Answers (1)

albodelu
albodelu

Reputation: 7981

Problem

java.lang.IllegalStateException: failed to find Build Tools revision 22.0.0

You need to match the installed build tools version and the project required version.

Solution

Change your build.gradle file to use the stable build tools version here.

ANDROID_BUILD_TOOLS_VERSION='22.0.0'

by

ANDROID_BUILD_TOOLS_VERSION='22.0.1'

Demonstration

I forked your project and solved the issue here

Note

I know that your latest commits are working without do it but you are downloading the build tools 22.0.1, after that trying to use version 22.0.0, missing it and downloading it here.

Build tools 22.0.0 missing. Downloading...

It's not clean and you are using an obsolete version without bug fixes.

Upvotes: 1

Related Questions