I guess it's a syntax issue, be sure you use it like here, it normally works:
TRAVIS_BUILD_DIR: The absolute path to the directory where the
repository being built has been copied on the worker.
- ${TRAVIS_BUILD_DIR}/gradle/caches/
- ls ${TRAVIS_BUILD_DIR}/gradle/caches/
Also check the lines below from here that links to this build and travis.yml (it works as shown here):
env:
global:
- ANDROID_HOME=${TRAVIS_BUILD_DIR}/android-sdk
- PATH=${ANDROID_HOME}/:${ANDROID_HOME}/tools/:${ANDROID_HOME}/platform-tools/:${PATH}
before_install:
- cp -R /usr/local/android-sdk-23.0.2 ./android-sdk
... You could create a ${TRAVIS_BUILD_DIR}/.travis-ci folder and save
there all the stuff so we can custom it.
# Comment out the lines below to show system image properties
- 'echo ${ANDROID_HOME}/system-images/${AVD_TARGET_DIR}/${AVD_TAG}/${AVD_ABI}'
- 'ls ${ANDROID_HOME}/system-images/${AVD_TARGET_DIR}/${AVD_TAG}/${AVD_ABI} -al || true'
- 'cat ${ANDROID_HOME}/system-images/${AVD_TARGET_DIR}/${AVD_TAG}/${AVD_ABI}/build.prop || true'
- echo 'DEFAULT SCRIPTS'
# Comment out the lines below to check default android scripts and PATH
- echo "$PATH"
- ls /usr/local/bin -Al
- cat /usr/local/bin/android-accept-licenses
- cat /usr/local/bin/android-update-sdk
- cat /usr/local/bin/android-wait-for-emulator