gpt4 book ai didi

android - Travis 模拟器在 android-wait-for-emulator 后停止

转载 作者:搜寻专家 更新时间:2023-11-01 07:50:46 24 4
gpt4 key购买 nike

您好,我有下一个 travis 配置:

语言:android

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,其中包含 adb 命令,这解释了为什么 android-wait-for-emulator 失败。

解决方案是从 components 部分删除 - platform-tools- tools,因为它们已经默认提供。

修复这个问题很困难,我相信这对任何人都有用。

关于android - Travis 模拟器在 android-wait-for-emulator 后停止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35438941/

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