12

我已经成功安装了 Android Emulator 插件并在 Jenkins 上工作。但是,我的问题是它在 3 分钟后超时。我只在一个非常慢的 nettop Linux 机器(intel atom)上运行它,所以我想启动模拟器需要更长的时间。

有没有办法延长超时?看起来模拟器正在启动;对于前几次民意调查,它报告为离线,然后不是。

我的控制台输出如下。

谢谢

Started by user Si Pickles
[EnvInject] - Loading node environment variables.
Building in workspace /var/lib/jenkins/jobs/mycompany_myapp/workspace
Updating svn://localhost/mycompany/code/trunk/myappProject at revision '2013-08-11T23:03:06.957 +0100'
At revision 98
no change for svn://localhost/mycompany/code/trunk/myappProject since the previous build
$ /var/lib/jenkins/tools/android-sdk/tools/android list target
[android] Using Android SDK: /var/lib/jenkins/tools/android-sdk
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb start-server
[android] Starting Android emulator
$ /var/lib/jenkins/tools/android-sdk/tools/emulator -no-boot-anim -ports 48437,50001 -avd google17 -no-snapshot-load -no-snapshot-save -no-window -no-audio
* daemon not running. starting it now on port 51447 *
* daemon started successfully *
Failed to Initialize backend EGL display
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001
[android] Waiting for emulator to finish booting...
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
error: device offline
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
error: device offline
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
error: device offline
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
error: device offline
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
error: device offline
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
error: device offline
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
error: device offline
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
error: device offline
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
error: device offline
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

[android] Timed-out after waiting 180 seconds for emulator
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:50001
[android] Stopping Android emulator

emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb kill-server

Archiving artifacts
Finished: NOT_BUILT
4

2 回答 2

2

您尝试使用哪个 android OS 版本?

如果您使用高于 Android 2.2 或 2.3.3 的版本,我建议您将 Android 操作系统版本更改为这些版本,因为它们的启动速度更快。

此外,如果您单击 Jenkins 配置页面上“通用模拟器选项”标题下的高级...按钮,您可以尝试设置启动延迟。如果您的构建在实际使用模拟器之前需要进行大量处理,这可能会有所帮助。

为混合答案/评论道歉,如果我有代表,我会发表评论。

于 2014-03-17T21:47:54.567 回答
-4

解决方案:使用硬件设备。

于 2014-03-18T13:02:24.897 回答