嗨,我有下一个 travis 配置:
语言:安卓
env:
global:
- JAVA8_HOME=/usr/lib/jvm/java-8-oracle
- TERM=dumb
jdk:
- oraclejdk8
android:
components:
- platform-tools
- tools
- build-tools-23.0.1
- build-tools-22.0.1
- android-23
- android-22
- extra
- extra-android-support
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
- addon-google_apis-google-23
- addon-google_apis-google-22
before_script:
- echo no | android create avd --force --name test --target android-21 --abi armeabi-v7a
- emulator -avd test -no-skin -no-audio -no-window -gpu off -no-boot-anim &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script:
- ./gradlew :projectcore:checkstyle
- ./gradlew clean build -x lint
- ./gradlew :project:connectedAndroidTest
好的,如果我运行这个,下载所有依赖项,但是当运行模拟器时停止它。
emulator -avd test -no-skin -no-audio -no-window -gpu off -no-boot-anim &
$ android-wait-for-emulator
Creating filesystem with parameters:
Size: 69206016
Block size: 4096
Blocks per group: 32768
Inodes per group: 4224
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 16896
Block groups: 1
Reserved block group size: 7
Created filesystem with 11/4224 inodes and 1302/16896 blocks
Failed to Initialize backend EGL display
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
我不知道问题是什么:S,有人对这个问题有任何线索吗?如果我删除 android-wait-for-emulator 继续执行,但测试失败,因为模拟器尚未连接(有意义)。 有想法吗?
最佳答案
我发现问题:尝试安装 platform-tools
时,Travis 无法移动文件夹,因为该文件夹存在并删除了文件夹内容,该文件夹是 platforms-tools
code>,其中包含 adb
命令,它解释了 android-wait-for-emulator
失败的原因。
解决方案是从组件部分中删除-platform-tools
和-tools
,因为默认情况下已经提供了这些内容。
解决这个问题很困难,我相信这对任何人都有用。
关于android - Travis 模拟器在 android-wait-for-emulator 之后停止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35438941/