gpt4 book ai didi

Jenkins 上的 Android 模拟器错误 : device offline

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

我已经为 Jenkins 安装了 Android Emulator 插件。我可以构建和测试 Android 项目。我的 Jenkins 在 Ubuntu 服务器上运行(只能通过终端访问)。该项目来自 Github。现在我想使用模拟器。这是我的配置:

  • Android 操作系统版本:4.4
  • 屏幕密度:160
  • 屏幕分辨率:480x800
  • 目标 ABI:armeabi-v7a

我还安装了 adb 并执行了以下命令:

/opt/android-sdk-linux/tools/android update sdk --no-ui 

但它不起作用:

 > /usr/bin/git rev-list 3440b28279e2e95113ce1c9499d9d881e76f6810 # timeout=10
$ /opt/android-sdk-linux/tools/android list target
[android] Using Android SDK: /opt/android-sdk-linux
$ /opt/android-sdk-linux/platform-tools/adb start-server
* daemon not running. starting it now on port 7767 *
* daemon started successfully *
$ /opt/android-sdk-linux/platform-tools/adb start-server
[android] Starting Android emulator
$ /opt/android-sdk-linux/tools/emulator -ports 7765,7766 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_160_WVGA_android-19_armeabi-v7a -no-snapshot-load -no-snapshot-save -no-window
Failed to Initialize backend EGL display
Could not initialize emulated framebufferemulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
emulator: warning: opening audio output failed

$ /opt/android-sdk-linux/platform-tools/adb connect localhost:7766
connected to localhost:7766
[android] Waiting for emulator to finish booting...
$ /opt/android-sdk-linux/platform-tools/adb -s localhost:7766 shell getprop init.svc.bootanim
error: device offline
$ /opt/android-sdk-linux/platform-tools/adb connect localhost:7766
$ /opt/android-sdk-linux/platform-tools/adb -s localhost:7766 shell getprop init.svc.bootanim
error: device offline
...
$ /opt/android-sdk-linux/platform-tools/adb connect localhost:7766
[android] Interrupted while waiting for emulator to finish booting.
[android] Emulator was shut down before it finished booting
$ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7766
[android] Stopping Android emulator
$ /opt/android-sdk-linux/platform-tools/adb kill-server
Archiving artifacts
Recording test results
ERROR: Publisher hudson.tasks.junit.JUnitResultArchiver aborted due to exception
hudson.AbortException: Test reports were found but none of them are new. Did tests run?
For example, AndroidManifest.xml is 10 min old

有人对这个问题有解释吗?谢谢

最佳答案

我遇到了同样的问题,即使在手动尝试命令时也是如此。但我可以根据评论使用 5555,5556 等端口解决问题:JENKINS-27456

有一个关联的拉取请求:PR on github

我会看看是否有时间获取并测试带有该补丁的构建,如果它解决了该问题,我会通知您。

关于Jenkins 上的 Android 模拟器错误 : device offline,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30066833/

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