1

I'm developing an android library. My project is using Gradle and don't have any application modules. Just library. I've connected this one to the Travis CI but every my push console was showing that my building process has been failing. This is my travis.yml

language: android
android:
  components:
    - build-tools-22.0.1
    - android-22
    - extra-android-m2repository
  licenses:
    - android-sdk-license-.+
before_install:
 - chmod +x gradlew
before_script:
 - echo no | android create avd --force -n test -t android-21 --abi armeabi-v7a
 - emulator -avd test -no-skin -no-audio -no-window &
 - curl http://is.gd/android_wait_for_emulator > android-wait-for-emulator
 - chmod u+x android-wait-for-emulator
 - ./android-wait-for-emulator
 - adb shell input keyevent 82 &

And error I got:

* What went wrong:
Execution failed for task ':library:connectedAndroidTest'.
com.android.builder.testing.ConnectedDevice > runTests[test(AVD) - 5.0] FAILED 
    com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Failed to establish session
        at com.android.builder.testing.ConnectedDevice.installPackages(ConnectedDevice.java:108)
null

So do I must do to resolve this problem? Thanks!

wolltone
  • 45
  • 6
  • The solution for this problem is most likely the one described in the answer to this question: http://stackoverflow.com/questions/28949722/android-tests-fail-on-travis-with-shellcommandunresponsiveexception – neits Nov 07 '15 at 16:01

1 Answers1

0

Add atleast one image file in your travis.yml like this

- sys-img-armeabi-v7a-android-19
- sys-img-x86-android-17
Nauman Afzaal
  • 1,046
  • 12
  • 20