Trying to get started with Travis CI for my Android projects. First I set up dummy project with Android Bootstrap, and added a the yml file from square’s otto project – modified to have my username and repo name.
My build fails with the error “/home/travis/build.sh: line 94: android: command not found, even when square’s project builds fine.
The error seems to indicate that the path isn’t set properly, in spite of having these lines in my .travis.yml
- export ANDROID_HOME=~/builds/f2prateek/FoodBot/android-sdk-linux
- export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
Is there something else I need to be setting up to get this right?
Update 2014/05: Travis CI now has official support for Android.
http://docs.travis-ci.com/user/languages/android/
The workarounds below are not required anymore, unless you want to use it on a
non-Android VM.
The issue is most likely with the fact that Travis CI switched over to 64-bit virtual machines. You need to install ia32-libs for Android to run in a 64-bit environment. This can currently be achieved with:
I wrote a blog post on getting Android builds running on Travis, which covers this as well as other details: http://rkistner.github.com/android/2013/02/05/android-builds-on-travis-ci/
Travis might support Android-specific virtual machines in the future, which will simplify the configuration. Follow the conversation on issue #56 for updates on this issue and discussions on the Android-specific VM.