Android Emulator in Jenkins

Viewed 2558

I tried to use Android Emulator in Jenkins, I follow this guide: Jenkins Plugin

I do it from headless build machines, CentOS. I tried to create emulator from jenkins like the example

When I try to do this like the example, but with my version, I get this error from the jenkins:

PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value [/opt/android-sdk_r24.2-linux]!
[android] Emulator did not appear to start; giving up
[android] Stopping Android emulator
$ /opt/android-sdk_r24.2-linux/platform-tools/adb kill-server
Finished: NOT_BUILT

I also try to do like the second example, I wrote " android list avd" in my terminal get :

Available Android Virtual Devices:
Name: android-23-emulator
Path: /root/.android/avd/android-23-emulator.avd
Target: Google APIs (Google Inc.)
     Based on Android 4.2.2 (API level 17)
Tag/ABI: default/armeabi-v7a

put the name "android-23-emulator" in the AVD name. And jenkins don't search this in the right folder, got this error:

FATAL: /var/lib/jenkins/.android/avd/android-23-emulator.ini (No such file or directory)
java.io.FileNotFoundException: /var/lib/jenkins/.android/avd/android-23-emulator.ini (No such file or directory)

When my:

ANDROID_AVD_HOME=/root/.android/avd
ANDROID_HOME=/opt/android-sdk_r24.2-linux
ANDROID_SDK_ROOT=/opt/android-sdk_r24.2-linux

I will be happy for any help! thanks!


1 Answers
Related