Jenkins作业因以下错误而失败:
[android] Using Android SDK: /var/lib/jenkins/tools/android-sdk
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb start-server
* daemon not running. starting it now at tcp:5855 *
* daemon started successfully *
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb start-server
[android] Starting Android emulator
$ /var/lib/jenkins/tools/android-sdk/tools/emulator -engine classic -ports 5712,5713 -report-console tcp:5831,max=60 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_240_WVGA_android-21_armeabi-v7a_jenkins -no-snapshot-load -no-snapshot-save -no-window
sh: file: command not found
sh: file: command not found
WARNING: Cannot decide host bitness because $SHELL is not properly defined; 32 bits assumed.
ERROR: 32-bit Linux Android emulator binaries are DEPRECATED, to use them
you will have to do at least one of the following:
- Use the '-force-32bit' option when invoking 'emulator'.
- Set ANDROID_EMULATOR_FORCE_32BIT to 'true' in your environment.
Either one will allow you to use the 32-bit binaries, but please be
aware that these will disappear in a future Android SDK release.
Consider moving to a 64-bit Linux system before that happens.
[android] Emulator did not appear to start; giving up
[android] Stopping Android emulator
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb kill-server
如果我将全局变量ANDROID_EMULATOR_FORCE_32BIT
设置为true
,则会产生稍微不同的错误
WARNING: Cannot decide host bitness because $SHELL is not properly defined; 32 bits assumed.
WARNING: Force to use classic engine to support snapshot.
PANIC: Missing emulator engine program for 'arm' CPU.
可能影响的Jenkins全局设置设置如下:
Shell executable
字段留空
Android SDK root
字段留空
Automatically install Android components when required
已检查
Keep emulators in the job workspace, in the .android subdirectory,
to isolate them as much as possible
已检查