嗨,我正在写一本 MAC 书。当我通过 Jenkins 80% 的时间启动 android 模拟器时,模拟器无法启动。没有詹金斯它可以工作。
Building in workspace /Users/Shared/Jenkins/Home/workspace/Stress Test
$ /Users/Shared/Jenkins/Home/tools/android-sdk/tools/android list target
[android] Using Android SDK: /Users/Shared/Jenkins/Home/tools/android-sdk
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb start-server
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
* daemon not running. starting it now on port 5653 *
* daemon started successfully *
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb start-server
[android] Starting Android emulator
$ /Users/Shared/Jenkins/Home/tools/android-sdk/tools/emulator -no-boot-anim -ports 5651,5652 -avd test_device -no-snapshot-load -no-snapshot-save -no-window
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
Failed to create Context 0x3005
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
HAX is working and emulator runs in fast virt mode
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5651
[android] Waiting for emulator to finish booting...
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5651 shell getprop dev.bootcomplete
error: device offline
...
我正在使用安卓模拟器插件。有趣的是,当我以 jenkins 用户身份使用命令行时,它也可以正常工作。有任何想法吗?