gpt4 book ai didi

android - 使用 Gradle 的 Travis-CI Android 测试不断超时

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:04:28 25 4
gpt4 key购买 nike

我正在尝试在 Travis CI 上构建和测试我的项目。它每次都会在我所有的存储库上向我显示相同的重复输出。

这是我的 travis.yml https://github.com/carts-uiet/cartsbusboarding/blob/master/.travis.yml

language: android
android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
# - platform-tools
# - tools
# The BuildTools version used by your project
- build-tools-21.0.0
# The SDK version used to compile your project
- android-21
# Additional components
- add-on
- extra
# Specify at least one system image,
# if you need to run emulator(s) during your tests
- sys-img-armeabi-v7a-android-21
# Emulator Management: Create, Start and Wait
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 &
- android-wait-for-emulator
- adb shell input keyevent 82 &

这是一个这样的构建 https://travis-ci.org/carts-uiet/cartsbusboarding/builds/39447907

$ javac -version
javac 1.7.0_60
before_script.1
3.53s$ echo no | android create avd --force -n test -t android-21 --abi armeabi-v7a
Android 5.0 is a basic Android platform.
Do you wish to create a custom hardware profile [no]Created AVD 'test' based on Android 5.0, ARM (armeabi-v7a) processor,
with the following hardware config:
hw.cpu.model=cortex-a8
hw.lcd.density=240
hw.ramSize=512
vm.heapSize=48
before_script.2
0.01s
$ emulator -avd test -no-skin -no-audio -no-window &
$ android-wait-for-emulator
Failed to Initialize backend EGL display
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
error: device offline
error: device offline
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: device offline
error: device offline
running
running
running
running
running
running

所有这些构建超时。

我在这里做错了什么?

最佳答案

更新后的响应:VM 镜像已经默认包含固定的 android-wait-for-emulator 脚本和 android SDK 工具版本 24.0.0,解决了这个问题。我删除了过时的回复和解决方法。

Build Environment Updates - 2014-12-09

关于android - 使用 Gradle 的 Travis-CI Android 测试不断超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26643444/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com