Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-18919

Android Emulator Plugin looks in workspace to find existing AVD

XMLWordPrintable

      The plugin looks in the workspace directory when searching for the specified AVD. The AVD (named "Image") is present in ~/.android/avd, but it looks in ~/workspace/<test-name>/.android/avd instead.

      15:59:12 FATAL: /Users/lkung/workspace/appium-android-test/.android/avd/Image.ini (No such file or directory)
      15:59:12 java.io.FileNotFoundException: /Users/lkung/workspace/appium-android-test/.android/avd/Image.ini (No such file or directory)
      15:59:12 at java.io.FileInputStream.open(Native Method)
      15:59:12 at java.io.FileInputStream.<init>(FileInputStream.java:138)
      15:59:12 at java.io.FileReader.<init>(FileReader.java:72)
      15:59:12 at hudson.plugins.android_emulator.util.Utils.parseConfigFile(Utils.java:478)
      15:59:12 at hudson.plugins.android_emulator.SdkInstaller$3.call(SdkInstaller.java:365)
      15:59:12 at hudson.plugins.android_emulator.SdkInstaller$3.call(SdkInstaller.java:362)
      15:59:12 at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      15:59:12 at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      15:59:12 at hudson.remoting.Request$2.run(Request.java:326)
      15:59:12 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      15:59:12 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      15:59:12 at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      15:59:12 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      15:59:12 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      15:59:12 at java.lang.Thread.run(Thread.java:724)

      When a symbolic link is created in the workspace dir to ~/.android/avd or the .ini and .avd files are copied to the workspace, the AVD is invalid (error: missing kernel file).

      16:16:42 $ /Users/lkung/tools/android-sdk/tools/android list target
      16:16:43 [android] Using Android SDK: /Users/lkung/tools/android-sdk
      16:16:43 $ /Users/lkung/tools/android-sdk/platform-tools/adb start-server
      16:16:43 [android] Starting Android emulator
      16:16:43 [android] Erasing existing emulator data...
      16:16:43 $ /Users/lkung/tools/android-sdk/tools/emulator -no-boot-anim -ports 59381,59382 -avd Image -no-snapshot-load -no-snapshot-save -wipe-data -http-proxy 10.15.11.60
      16:16:43 emulator: ERROR: This AVD's configuration is missing a kernel file!!
      16:16:46 * daemon not running. starting it now on port 59383 *
      16:16:46 * daemon started successfully *
      16:17:48 [android] Emulator did not appear to start; giving up
      16:17:48 $ /Users/lkung/tools/android-sdk/platform-tools/adb disconnect localhost:59382
      16:17:48 [android] Stopping Android emulator
      16:17:48 $ /Users/lkung/tools/android-sdk/platform-tools/adb kill-server

      I tried setting $ANDROID_SDK_HOME to $HOME and $ANDROID_SDK_ROOT to $ANDROID_HOME using the EnvInject plugin, but neither of those worked.

      Edit: The emulator image runs fine when launched locally ("emulator @Image").

            orrc Christopher Orr
            linguinee Ling-Yi Kung
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: