Het blijkt dat het gebruik van de genoemde /etc/init.d/ ...
werkt betrouwbaarder. Er zijn enkele waarschuwingen die men moet gebruiken sudo service ...
maar daar was ik niet in geslaagd. Dus dit is wat ik nu doe:
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