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

Plugin does not work with Android build tools 26.0.2

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • None
    • Mac Sierra 10.12.4
      Android Studio 2.3.1
      Jenkins 2.19.4
      android-emulator-plugin 2.15
      Android build tools 26.0.2

      After upgrading to android build tools 26.0.2, the plugin no longer works. Here are the logs we see

      [android] Starting Android emulator
      <PATH_TO_ANDROID_HOME>android/tools/emulator -engine classic -ports 5784,5785 -report-console tcp:5853,max=60 -avd ci-22 -no-snapshot-load -no-snapshot-save -no-audio -no-window
      PANIC: Missing emulator engine program for 'x86' CPU.
      [android] Emulator did not appear to start; giving up
      [android] Stopping Android emulator
      

      After digging into things, we found that Android have moved things around with the recent build tools and now the emulator tools are found at "android/emulator/" instead of "android/tools/emulator"

      So we changed the plugin code, in particular the AndroidEmulator class, to look for the emulator at the new path. Things started to improve a little, however now we get this....

      emulator: ERROR: could not connect to server on TCP:5868: Operation timed out
      

      The "-report-console" argument seems to be the problem. If this argument is left out the emulator starts ok, however the plugin can't interact with it and times out.

      [android] Emulator did not appear to start; giving up
      [android] Stopping Android emulator
      

      Any ideas?

      Regards,
      Dom

            orrc Christopher Orr
            dominicmarmion Dominic Marmion
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: