How to Publish Android Library in Bintray using Travis CI
Shanmugasanthosh A
1021

How about this one

language: android
android:
components:
- tools # to get the new `repository-11.xml`
- tools # see https://github.com/travis-ci/travis-ci/issues/6040#issuecomment-219367943)
- platform-tools
- build-tools-28.0.2
- android-28
before_install:
- yes | sdkmanager "platforms;android-28"
script:
- ./gradlew build connectedCheck

you can use sdkmanager to download specific android version.