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!