我正在尝试在Jenkins服务器上运行模拟器。 但我一直收到这个错误,Jenkins无法启动下面错误的模拟器becoz,直到它超时:
[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
我该怎么做才能克服这个问题?
答案 0 :(得分:0)
我遇到了同样的问题,结果发现adb崩溃了。在我的情况下,崩溃的原因是权限错误。尝试在运行作业之前删除文件/tmp/adb.log
。有关更多信息,请参阅此主题:Is it possible to fake a specific path for a process?
您还可以将-verbose
选项添加到模拟器中,以查看可能有用的更多输出。