我在運行Ubuntu 14.04的Macbook Air上安裝了Jenkins 1.568。我安裝了android模擬器插件,並且我已經設置的配置在開始每個構建之前在-no-window
模式下運行模擬器。Android仿真器在360秒後未能啓動
關於該版本的一半都很好,但另一半,我得到的控制檯上執行以下操作:
[android] Starting Android emulator
$ /usr/local/src/android/android-sdk-linux/tools/emulator -no-boot-anim -ports 5782,5783 -avd Caesar -no-snapshot-load -no-snapshot-save -no-window -no-audio -no-skin -no-window
* daemon not running. starting it now on port 5784 *
* daemon started successfully *
Failed to Initialize backend EGL display
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
[android] Waiting for emulator to finish booting...
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb disconnect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb disconnect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb disconnect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb disconnect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb disconnect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb disconnect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb disconnect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb disconnect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb disconnect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb disconnect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb disconnect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb disconnect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb -s emulator-5782 shell getprop dev.bootcomplete
error: device offline
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb connect emulator-5782
[android] Timed-out after waiting 360 seconds for emulator
$ /usr/local/src/android/android-sdk-linux/platform-tools/adb disconnect emulator-5782
[android] Stopping Android emulator
顯然,仿真器出現故障的時間約50%。我不知道爲什麼,或者如何解決它。任何建議都會受到歡迎,我可以如何運行,而不必使用naginator重新啓動失敗的版本。
你解決了這個問題嗎?我面對完全相同 –
不,對不起佩德羅。我還沒有解決這個問題。我仍在等待答案。與此同時,如果失敗,我再次運行構建(最多可以嘗試5次),從而緩解了這一問題。不是一個最佳的解決方案,但更好的方法是讓它失敗並保持失敗。 – jwir3
謝謝,我一直在尋找一個解決方案,但沒有發現任何東西,所以我有一個java測試版本,用於模塊化的東西,它不依賴於模擬器,另一個工作僅用於測試,我在那裏發佈時間是必要的。所以現在我已經從jenkins下載了我的發佈版本,唯一不好的是所有依賴於仿真器的測試用例都必須在不同的工作中啓動。如果我找到解決方案,我會發布它! –