我目前正試圖得到一個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