jenkins无法连接到mac osx上的android模拟器

时间:2015-12-11 00:50:28

标签: android jenkins user-permissions

我正在玩一个运行el capitan的macbook pro上的jenkins,我尝试了很多东西但是我试图关注的例子每次模拟器试图运行都会失败。当我运行我创建的作业时应该在github上下载一个Google样本仓库并在其中运行测试我得到以下输出,直到作业终止:

    [android] Using Android SDK: /Users/Shared/Jenkins/Home/tools/android-sdk
    $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb start-server
    * daemon not running. starting it now on port 8611 *
    * daemon started successfully *
    $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb start-server
    $ /Users/Shared/Jenkins/Home/tools/android-sdk/tools/emulator -snapshot-list -no-window -avd hudson_en-US_560_1440x2560_android-21_x86_nexus
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
[android] Starting Android emulator and creating initial snapshot
[android] Erasing existing emulator data...
$ /Users/Shared/Jenkins/Home/tools/android-sdk/tools/emulator -ports 8609,8610 -avd hudson_en-US_560_1440x2560_android-21_x86_nexus -no-snapshot-load -no-snapshot-save -wipe-data -no-window
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
Creating filesystem with parameters:
    Size: 69206016
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 4224
    Inode size: 256
    Journal blocks: 1024
    Label: 
    Blocks: 16896
    Block groups: 1
    Reserved block group size: 7
Created filesystem with 11/4224 inodes and 1302/16896 blocks
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 localhost:8610
unable to connect to localhost:8610: Connection refused
[android] Waiting for emulator to finish booting...
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s localhost:8610 shell getprop init.svc.bootanim
error: device 'localhost:8610' not found
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect localhost:8610
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s localhost:8610 shell getprop init.svc.bootanim
error: device 'localhost:8610' not found
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect localhost:8610
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s localhost:8610 shell getprop init.svc.bootanim
error: device 'localhost:8610' not found
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect localhost:8610
error: no such device 'localhost:8610'
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect localhost:8610
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s localhost:8610 shell getprop init.svc.bootanim
error: device 'localhost:8610' not found
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect localhost:8610
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s localhost:8610 shell getprop init.svc.bootanim
error: device 'localhost:8610' not found
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect localhost:8610
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s localhost:8610 shell getprop init.svc.bootanim
error: device 'localhost:8610' not found
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect localhost:8610
error: no such device 'localhost:8610'
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect localhost:8610
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s localhost:8610 shell getprop init.svc.bootanim
error: device 'localhost:8610' not found
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect localhost:8610<code> 

我在网上看到jenkins的android模拟器插件有问题,但据说在今年早些时候发布的版本中已修复。 jenkins扮演的用户是否可能无权在我的机器上执行任何操作,因此一旦启动并运行它就无法对模拟器执行任何操作?它确实看起来像模拟器正在运行所以我现在很困惑。我应该尝试在使用Ubuntu的虚拟盒子上运行jenkins吗?我觉得这个我想要完成的简单任务比它应该更加复杂。

0 个答案:

没有答案