Ternyata dengan menggunakan /etc/init.d/ ...
bekerja lebih dapat diandalkan. Ada beberapa peringatan bahwa seseorang harus menggunakan sudo service ...
tapi saya tidak berhasil dengan itu. Jadi inilah yang saya jalankan sekarang:
language: android
jdk:
- oraclejdk7
- openjdk7
android:
components:
# All the build system components should be at the latest version
- tools
- platform-tools
- build-tools-21.1.1
- android-19
# The libraries we can't get from Maven Central or similar
- extra-android-support
notifications:
email: true
before_script:
# Disable services enabled by default
# http://docs.travis-ci.com/user/database-setup/#MySQL
- sudo /etc/init.d/mysql stop
- sudo /etc/init.d/postgresql stop
# The following did not work reliable
# - sudo service mysql stop
# - sudo service postgresql stop
# Ensure Gradle wrapper is executable
- chmod +x gradlew
# Ensure signing configuration is present
- mv app/gradle.properties.example app/gradle.properties
script:
- ./gradlew clean assembleDebug