5

我正在尝试在 Jenkins 服务器上运行模拟器。但是我不断收到这个错误,即 Jenkins 无法启动模拟器,因为它会出现以下错误,直到超时:

[android] Waiting 10 seconds before starting emulator...

$ /opt/android-sdk-linux/platform-tools/adb start-server

* daemon not running. starting it now on port 9666 *
* daemon started successfully *
$ /opt/android-sdk-linux/platform-tools/adb start-server
[android] Starting Android emulator
$ /opt/android-sdk-linux/tools/emulator64-arm -ports 9664,9665 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_320_HVGA_android-19_armeabi-v7a -no-snapshot-load -no-snapshot-save -no-window -no-audio -gpu off

resize2fs 1.42.13 (17-May-2015)
The filesystem is already 51200 (4k) blocks long.  Nothing to do!

$ /opt/android-sdk-linux/platform-tools/adb connect localhost:9665
unable to connect to localhost:9665: Connection refused
[android] Waiting for emulator to finish booting...
$ /opt/android-sdk-linux/platform-tools/adb -s localhost:9665 shell getprop init.svc.bootanim
error: device 'localhost:9665' not found
$ /opt/android-sdk-linux/platform-tools/adb connect localhost:9665

$ /opt/android-sdk-linux/platform-tools/adb -s localhost:9665 shell getprop init.svc.bootanim
error: device 'localhost:9665' not found
$ /opt/android-sdk-linux/platform-tools/adb connect localhost:9665

$ /opt/android-sdk-linux/platform-tools/adb -s localhost:9665 shell getprop init.svc.bootanim
error: device 'localhost:9665' not found
$ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:9665
error: no such device 'localhost:9665'
$ /opt/android-sdk-linux/platform-tools/adb connect localhost:9665

$ /opt/android-sdk-linux/platform-tools/adb -s localhost:9665 shell getprop init.svc.bootanim
error: device 'localhost:9665' not found
$ /opt/android-sdk-linux/platform-tools/adb connect localhost:9665

$ /opt/android-sdk-linux/platform-tools/adb -s localhost:9665 shell getprop init.svc.bootanim
error: device 'localhost:9665' not found
$ /opt/android-sdk-linux/platform-tools/adb connect localhost:9665

$ /opt/android-sdk-linux/platform-tools/adb -s localhost:9665 shell getprop init.svc.bootanim
error: device 'localhost:9665' not found
$ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:9665
error: no such device 'localhost:9665'
$ /opt/android-sdk-linux/platform-tools/adb connect localhost:9665

$ /opt/android-sdk-linux/platform-tools/adb -s localhost:9665 shell getprop init.svc.bootanim
error: device 'localhost:9665' not found
$ /opt/android-sdk-linux/platform-tools/adb connect localhost:9665

$ /opt/android-sdk-linux/platform-tools/adb -s localhost:9665 shell getprop init.svc.bootanim
error: device 'localhost:9665' not found
$ /opt/android-sdk-linux/platform-tools/adb connect localhost:9665

$ /opt/android-sdk-linux/platform-tools/adb -s localhost:9665 shell getprop init.svc.bootanim
error: device 'localhost:9665' not found

我应该怎么做才能克服这个该死的问题?

4

1 回答 1

0

我遇到了同样的问题,结果发现 adb 崩溃了。就我而言,崩溃的原因是权限错误。/tmp/adb.log在运行作业之前尝试删除文件。请参阅此线程以获取更多信息:是否可以伪造进程的特定路径?

您还可以将-verbose选项添加到模拟器以查看更多可能有帮助的输出。

于 2016-01-20T16:45:06.137 回答