Unable to accept license for build-28.0.3 and android SDK 27

android
#1

Link to Travis Log

Travis file

language: android
jdk: oraclejdk8

sudo: required
dist: precise

env:
  global:
    - ANDROID_API_LEVEL=27  # Compile SDK version
    - EMULATOR_API_LEVEL=19
    - ANDROID_BUILD_TOOLS_VERSION=28.0.3
    - ANDROID_ABI=armeabi-v7a
    - ANDROID_TAG=google_apis
    - ADB_INSTALL_TIMEOUT=20 # minutes (2 minutes by default)

android:
  components:
#    # latest version of the tools
#    - tools
#    - platform-tools

    # build tools version
    - build-tools-$ANDROID_BUILD_TOOLS_VERSION

    # The SDK Version
    - android-$ANDROID_API_LEVEL
    - android-$EMULATOR_API_LEVEL

    # For Google APIs
    - addon-google_apis-google-$ANDROID_API_LEVEL
    - addon-google_apis-google-$EMULATOR_API_LEVEL

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

    # Emulator
    - sys-img-armeabi-v7a-google_apis-$EMULATOR_API_LEVEL

  licenses:
    # White list all android-sdk-license revisions.
    - 'android-sdk-license-.+'
    # White list all the licenses.
    - '.+'

#install:
#  - echo yes | ${ANDROID_HOME}/tools/bin/sdkmanager "platforms;android-27"


# Emulator Management: Create, Start and Wait
before_script:
  - echo no | android create avd --force -n test -t "android-"$EMULATOR_API_LEVEL --abi $ANDROID_ABI --tag $ANDROID_TAG
  - emulator -avd test -no-audio -no-window &
  - android-wait-for-emulator
  - adb shell input keyevent 82 &

#before_install:
#  - yes | sdkmanager "platforms;android-28" # Fails , no such command
#  - echo yes | sdkmanager "build-tools;28.0.3"  # Fails , no such command
#  - yes | sdkmanager "build-tools;28.0.3"   # Fails , no such command
#  - yes | sdkmanager --licenses

I have almost tried every way to fix this. For accepting the license, I’m getting below error.

$ yes | sdkmanager "build-tools;28.0.3"

/home/travis/.travis/functions: line 104: sdkmanager: command not found

The command "yes | sdkmanager "build-tools;28.0.3"" failed and exited with 127 during . 

If anyone can help. I would be thankful to him/her.