language: android

android:
  update_sdk: true  #Check for the updates each time you run the build.
  components:
    - tools
    - platform-tools
    - build-tools-25.0.3
    - android-25
    - android-22

    # Additional components
    - extra-android-m2repository
    - extra-google-m2repository
    - extra-android-support

    #system images for emulator
    - sys-img-armeabi-v7a-android-22

licenses:
    - 'android-sdk-preview-license-.+'
    - 'android-sdk-license-.+'
    - 'google-gdk-license-.+'

jdk:
  - oraclejdk8

before_script:
  # Create and start an emulator for instrumentation tests.
  - echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a
  - emulator -avd test -no-window &
  - android-wait-for-emulator
  - adb shell input keyevent 82 &

script:
  - "./gradlew clean testDebugUnitTest jacocoTestDebugUnitTestReport connectedDebugAndroidTest"

after_success:
  - bash <(curl -s https://codecov.io/bash)

sudo: false

before_cache:
    - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock

cache:
  directories:
    - $HOME/.gradle
    - $HOME/.android/build-cache

language: android

android:
  update_sdk: true  #Check for the updates each time you run the build.
  components:
    - tools
    - platform-tools
    - build-tools-25.0.3
    - android-25
    - android-22

    # Additional components
    - extra-android-m2repository
    - extra-google-m2repository
    - extra-android-support

    #system images for emulator
    - sys-img-armeabi-v7a-android-16

licenses:
    - 'android-sdk-preview-license-.+'
    - 'android-sdk-license-.+'
    - 'google-gdk-license-.+'

jdk:
  - oraclejdk8

before_script:
  # Create and start an emulator for instrumentation tests.
  - echo no | android create avd --force -n test -t android-16 --abi armeabi-v7a
  - emulator -avd test -no-window &
  - android-wait-for-emulator
  - adb shell input keyevent 82 &

script:
  - "./gradlew clean testDebugUnitTest jacocoTestDebugUnitTestReport connectedDebugAndroidTest"

after_success:
  - bash <(curl -s https://codecov.io/bash)

sudo: false

before_cache:
    - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock

cache:
  directories:
    - $HOME/.gradle
    - $HOME/.android/build-cache

Change android image from API 22 to 16 API
Change android image from API 22 to 16 API

It should improve startup time.
