Android Emulator Plugin Failed to Initialize backend EGL display

此生再无相见时 提交于 2019-12-11 02:54:44

问题


I set up a Jenkins Job on Cloudbees and I can successfully checkout and compile my Android project there. Now I would like to run some JUnit tests in the android emulator and added the Android emulator plugin. I set the “Show Emulator Window“ option to false but after startup of the emulator I always get the error message: “Emulator did not appear to start; giving up”. Has anyone experience with Android builds on Cloudbees?

Build log:


    $ /opt/android/android-sdk-linux/tools/android list target
    [android] Using Android SDK: /opt/android/android-sdk-linux
    [android] Creating Android AVD: /home/jenkins/.android/avd/hudson_en-US_160_WVGA_android-17_armeabi-v7a.avd
    [android] /opt/android/android-sdk-linux/tools/android create avd -f -a -c 64M -s WVGA800 -n hudson_en-US_160_WVGA_android-17_armeabi-v7a -t android-17 --abi armeabi-v7a
    $ /opt/android/android-sdk-linux/platform-tools/adb start-server
    [android] Starting Android emulator
    $ /opt/android/android-sdk-linux/tools/emulator -no-boot-anim -ports 59102,56142 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_160_WVGA_android-17_armeabi-v7a -no-snapshot-load -no-snapshot-save -no-window
    Failed to Initialize backend EGL display
    * daemon not running. starting it now on port 52538 *
    * daemon started successfully *
    [android] Emulator did not appear to start; giving up
    $ /opt/android/android-sdk-linux/platform-tools/adb disconnect localhost:56142
    [android] Stopping Android emulator
    $ /opt/android/android-sdk-linux/platform-tools/adb kill-server


回答1:


Compare your job configuration with https://partnerdemo.ci.cloudbees.com/job/Android-dev/job/stockfish-android-cloud/, paying particular attention to the following settings:

Inject env var: LD_LIBRARY_PATH=/opt/android/android-sdk-linux/tool/lib
Target ABI: armeabi-v7a
Advanced -> Emulator Options: -no-audio -gpu off
Advanced -> Emulator Executable: emulator64-arm


来源:https://stackoverflow.com/questions/22333041/android-emulator-plugin-failed-to-initialize-backend-egl-display

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!