我目前正试图得到一个travis.yml适用于Android 24 /构建工具24.0.3和有一些麻烦。与Android Lib的特拉维斯CI - 没有兼容的设备连接
我有我的travis.yml如下:
language: android
sudo: required
jdk: oraclejdk8
cache:
directories:
- ${TRAVIS_BUILD_DIR}/gradle/caches/
- ${TRAVIS_BUILD_DIR}/gradle/wrapper/dists/
env:
global:
- ANDROID_API_LEVEL=24
- ANDROID_BUILD_TOOLS_VERSION=24.0.3
- ANDROID_ABI=armeabi-v7a
- ANDROID_TAG=google_apis
- ADB_INSTALL_TIMEOUT=20 # minutes (2 minutes by default)
android:
components:
- tools # to get the new `repository-11.xml`
- platform-tools
- tools # to install Android SDK tools 25.1.x
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
- android-$ANDROID_API_LEVEL
# For Google APIs
- addon-google_apis-google-$ANDROID_API_LEVEL
# Support library
- extra-android-support
# Latest artifacts in local repository
- extra-google-m2repository
- extra-android-m2repository
# Specify at least one system image
- sys-img-armeabi-v7a-google_apis-$ANDROID_API_LEVEL
before_script:
- echo no | android create avd --force -n test -t "android-"$ANDROID_API_LEVEL --abi $ANDROID_ABI --tag $ANDROID_TAG
- emulator -avd test -no-skin -no-window &
- android-wait-for-emulator
script:
- ./gradlew clean jacocoDebugTestReport
我现在的问题是,我不断收到:
: No compatible devices connected.[TestRunner] FAILED Found 1 connected device(s), 0 of which were compatible. :app:connectedDebugAndroidTest FAILED
或:
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
这完全是两个单独的错误状态。
有没有人看到任何明显错误或不正确的关于我的travis.yml,可以帮助解释为什么它不工作。
感谢您分享您的工作解决方案。真的,下载这两个平台是正确的。你的[sdk目标](https://github.com/ardock/android-topeka/blob/acib/scripts/acib#L49)和每个[模拟器目标](https://github.com/ardock/android-topeka /blob/acib/.travis.yml#L27)。以前的平台是[预安装的](https://github.com/travis-ci/travis-cookbooks/blob/a68419ebe0ce92876a70534cd145ddd931d0feee/ci_environment/android-sdk/attributes/default.rb)。 – albodelu