我有詹金斯的docker镜像。
jenkins 的主目录是:/var/jenkins_home
映射到/home/user
因此,我安装了 android-sdk,它映射到:
/home/user/tools/android-sdk/
当我将 Android 插件安装到 Jenkins 并进行其他操作时。
我开始构建并出现错误:
21:16:22 $ /var/jenkins_home/tools/android-sdk/tools/android list target
21:16:23 [android] Using Android SDK: /var/jenkins_home/tools/android-sdk
21:16:23 $ /var/jenkins_home/tools/android-sdk/platform-tools/adb start-server
21:16:26 * daemon not running. starting it now on port 5847 *
21:16:26 * daemon started successfully *
21:16:26 $ /var/jenkins_home/tools/android-sdk/platform-tools/adb start-server
21:16:26 [android] Starting Android emulator
21:16:26 $ /var/jenkins_home/tools/android-sdk/tools/emulator -engine classic -ports 5794,5795 -report-console tcp:5824,max=60 -avd hudson_ru_RU_160_1920x1280_android-25_armeabi-v7a -no-snapshot-load -no-snapshot-save -no-window -force-32bit
21:16:26 sh: 1: file: not found
21:16:26 sh: 1: file: not found
21:16:26 WARNING: Cannot decide host bitness because $SHELL is not properly defined; 32 bits assumed.
21:16:26 WARNING: Force to use classic engine to support snapshot.
21:16:26 PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value [/var/jenkins_home/.android/avd]!
21:17:31 [android] Emulator did not appear to start; giving up
21:17:31 [android] Stopping Android emulator
21:17:31 $ /var/jenkins_home/tools/android-sdk/platform-tools/adb kill-server
我尝试更改ANDROID_SDK_ROOT
为另一个目录,但没有变化..错误即将无法启动 Android 模拟器...我手动创建 android 模拟器,然后尝试从 Jenkins 启动它。
你能帮我修复这个错误吗?
PS 我认为是 docker。我认为我应该复制/bin/bash
到“/bin/sh”