Android Emulator Jenkins Plugin not working

那年仲夏 提交于 2019-11-30 03:12:38
Karen Kraft

The Jenkins Android Emulator issues I have had are legion. Here is a checklist to help:

1) You need the --all flag for both android list and android update sdk, otherwise some packages will not be installed: ex for SDK 24

1a)$ANDROID_HOME/tools/android list sdk --all

1b)

(for i in {1..100}; do echo y; sleep 1; done) |
$ANDROID_HOME/tools/android update sdk --no-ui --all --filter 
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,21,22,23,24,25,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,79,80,81,82,82,84,85,101,102,103,112,113,117,118,119,120,121,122,123,124

If you get the dreaded /home/jenkins/android-sdk-linux/platform-tools/adb -s emulator-XXXX shell getprop dev.bootcomplete error: device offline error, you are likely missing a package in step 1b

2)Ignore the dreaded Failed to Initialize backend EGL display error, it is a red herring

3)Be sure to use the Advanced Emulator options:

Emulator Options: -no-audio -gpu off
Emulator executable: emulator64-arm
Startup delay: 10  -- this *may* help

4)a pre-build script ${ANDROID_HOME}/platform-tools/adb kill-server can't hurt

Good luck!

I started having the same problem after upgrading the Android Emulator plugin to 2.11.1. Downgrading to 2.10 via the plugin manager has proved itself to be an acceptable workaround for me.

Experiencing the same issue, using the Jenkins Android Emulator Plugin v2.13 with emulators running android-19 and above.

I found an open Jenkins ticket to fix the issue here.

Looks like a fix would require an update to the Android Emulator Plugin. In the meantime one workaround is to use a pre-android-19 emulator - I have not had the issue on android-16, android-17 or android-18 emulators.

An alternative workaround is to try downgrading the Android Emulator Plugin to v2.10, as @zachgeek suggested.

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